Skip to content

Commit 8a7fadb

Browse files
committed
*: U1000
1 parent 02a0bb7 commit 8a7fadb

File tree

5 files changed

+0
-40
lines changed

5 files changed

+0
-40
lines changed

apps/nsq_to_file/nsq_to_file.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ import (
1818
"github.com/nsqio/nsq/internal/version"
1919
)
2020

21-
func hasArg(s string) bool {
22-
argExist := false
23-
flag.Visit(func(f *flag.Flag) {
24-
if f.Name == s {
25-
argExist = true
26-
}
27-
})
28-
return argExist
29-
}
30-
3121
func flagSet() *flag.FlagSet {
3222
fs := flag.NewFlagSet("nsqd", flag.ExitOnError)
3323

apps/nsq_to_http/nsq_to_http.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,6 @@ func (p *GetPublisher) Publish(addr string, msg []byte) error {
155155
return nil
156156
}
157157

158-
func hasArg(s string) bool {
159-
argExist := false
160-
flag.Visit(func(f *flag.Flag) {
161-
if f.Name == s {
162-
argExist = true
163-
}
164-
})
165-
return argExist
166-
}
167-
168158
func main() {
169159
var publisher Publisher
170160
var addresses app.StringArray

apps/nsq_to_nsq/nsq_to_nsq.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -254,16 +254,6 @@ func (ph *PublishHandler) HandleMessage(m *nsq.Message, destinationTopic string)
254254
return nil
255255
}
256256

257-
func hasArg(s string) bool {
258-
argExist := false
259-
flag.Visit(func(f *flag.Flag) {
260-
if f.Name == s {
261-
argExist = true
262-
}
263-
})
264-
return argExist
265-
}
266-
267257
func main() {
268258
var selectedMode int
269259

internal/http_api/api_response.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ func (e Err) Error() string {
2424
return e.Text
2525
}
2626

27-
func acceptVersion(req *http.Request) int {
28-
if req.Header.Get("accept") == "application/vnd.nsq; version=1.0" {
29-
return 1
30-
}
31-
32-
return 0
33-
}
34-
3527
func PlainText(f APIHandler) APIHandler {
3628
return func(w http.ResponseWriter, req *http.Request, ps httprouter.Params) (interface{}, error) {
3729
code := 200

nsqd/protocol_v2.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ import (
1717
"github.com/nsqio/nsq/internal/version"
1818
)
1919

20-
const maxTimeout = time.Hour
21-
2220
const (
2321
frameTypeResponse int32 = 0
2422
frameTypeError int32 = 1

0 commit comments

Comments
 (0)