Skip to content

Commit 458beb6

Browse files
committed
Fix errcheck lint issues
1 parent 3bb6c1b commit 458beb6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func main() {
3030
}
3131

3232
logger, _ := zap.NewProduction()
33-
defer logger.Sync()
33+
defer func() { _ = logger.Sync() }()
3434

3535
acl := internal.NewACL(*aclFile)
3636

@@ -71,7 +71,7 @@ func main() {
7171
signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
7272
<-sigCh
7373
logger.Info("shutting down")
74-
server.Close()
74+
_ = server.Close()
7575
}()
7676

7777
logger.Info("starting server", zap.String("listen", *listen), zap.String("docker-socket", *dockerSocket))

main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func newTestHandler(t *testing.T) http.Handler {
2929
guard := guards.NewServicesEdit(context.Background(), testLogger, testACL, dockerApi)
3030
backend := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
3131
w.WriteHeader(http.StatusOK)
32-
w.Write([]byte("OK"))
32+
_, _ = w.Write([]byte("OK"))
3333
})
3434
return authMiddleware(testLogger, testACL, guard, backend)
3535
}

0 commit comments

Comments
 (0)