Skip to content

Commit b4bd598

Browse files
committed
fix even more linter errors
1 parent 5aceaaa commit b4bd598

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/whawty-auth/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func cmdInit(c *cli.Context) error {
106106
if err := s.GetInterface().Init(username, password); err != nil {
107107
return cli.NewExitError(fmt.Sprintf("Error initializing whawty store: %s", err), 3)
108108
}
109-
return cli.NewExitError(fmt.Sprintf("whawty store successfully initialized!"), 0)
109+
return cli.NewExitError("whawty store successfully initialized!", 0)
110110
}
111111

112112
func cmdCheck(c *cli.Context) error {
@@ -119,7 +119,7 @@ func cmdCheck(c *cli.Context) error {
119119
if err := s.GetInterface().Check(); err != nil {
120120
return cli.NewExitError(fmt.Sprintf("Error checking whawty store: %s", err), 3)
121121
}
122-
return cli.NewExitError(fmt.Sprintf("whawty store is ok!"), 0)
122+
return cli.NewExitError("whawty store is ok!", 0)
123123
}
124124

125125
func openAndCheck(c *cli.Context) (*store, error) {
@@ -436,7 +436,7 @@ func cmdRun(c *cli.Context) error {
436436
}
437437
wg.Wait()
438438

439-
return cli.NewExitError(fmt.Sprintf("shutting down since all auth sockets have closed."), 0)
439+
return cli.NewExitError("shutting down since all auth sockets have closed.", 0)
440440
}
441441

442442
func cmdRunSa(c *cli.Context) error {

cmd/whawty-auth/web_api.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func handleWebAuthenticate(store *Store, sessions *webSessionFactory, w http.Res
109109
respdata.Username = reqdata.Username
110110
respdata.IsAdmin = isAdmin
111111
respdata.LastChanged = lastChanged
112-
status := http.StatusOK
112+
var status int
113113
status, respdata.Error, respdata.Session = sessions.Generate(reqdata.Username, isAdmin)
114114
sendWebResponse(w, status, respdata)
115115
}

0 commit comments

Comments
 (0)