Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter fixes required by latest golangci-lint versions #903

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/upstream/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func main() {
flag.Parse()

log.Printf("upstream listening HTTP/1.1 on %d\n", upstreamPort)
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/", func(w http.ResponseWriter, _ *http.Request) {
if _, err := w.Write([]byte(hello)); err != nil {
log.Println(err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/v3/delta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ func TestDeltaCallbackError(t *testing.T) {
config.deltaResources = makeDeltaResources()

s := server.NewServer(context.Background(), config, server.CallbackFuncs{
DeltaStreamOpenFunc: func(ctx context.Context, i int64, s string) error {
DeltaStreamOpenFunc: func(context.Context, int64, string) error {
return errors.New("stream open error")
},
})
Expand Down
8 changes: 4 additions & 4 deletions pkg/server/v3/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,20 +371,20 @@ func TestFetch(t *testing.T) {
callbackError := false

cb := server.CallbackFuncs{
StreamOpenFunc: func(ctx context.Context, i int64, s string) error {
StreamOpenFunc: func(context.Context, int64, string) error {
if callbackError {
return errors.New("stream open error")
}
return nil
},
FetchRequestFunc: func(ctx context.Context, request *discovery.DiscoveryRequest) error {
FetchRequestFunc: func(context.Context, *discovery.DiscoveryRequest) error {
if callbackError {
return errors.New("fetch request error")
}
requestCount++
return nil
},
FetchResponseFunc: func(request *discovery.DiscoveryRequest, response *discovery.DiscoveryResponse) {
FetchResponseFunc: func(*discovery.DiscoveryRequest, *discovery.DiscoveryResponse) {
responseCount++
},
}
Expand Down Expand Up @@ -666,7 +666,7 @@ func TestCallbackError(t *testing.T) {
config.responses = makeResponses()

s := server.NewServer(context.Background(), config, server.CallbackFuncs{
StreamOpenFunc: func(ctx context.Context, i int64, s string) error {
StreamOpenFunc: func(context.Context, int64, string) error {
return errors.New("stream open error")
},
})
Expand Down
Loading