1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-12 10:00:41 +00:00

add golint check and fix all golints

This commit is contained in:
astaxie
2017-04-30 22:41:23 +08:00
parent ea3d0690cf
commit a91e2e9950
20 changed files with 271 additions and 175 deletions

View File

@ -291,7 +291,7 @@ func (srv *Server) fork() (err error) {
// RegisterSignalHook registers a function to be run PreSignal or PostSignal for a given signal.
func (srv *Server) RegisterSignalHook(ppFlag int, sig os.Signal, f func()) (err error) {
if ppFlag != PreSignal && ppFlag != PostSignal {
err = fmt.Errorf("Invalid ppFlag argument. Must be either grace.PreSignal or grace.PostSignal.")
err = fmt.Errorf("Invalid ppFlag argument. Must be either grace.PreSignal or grace.PostSignal")
return
}
for _, s := range hookableSignals {
@ -300,6 +300,6 @@ func (srv *Server) RegisterSignalHook(ppFlag int, sig os.Signal, f func()) (err
return
}
}
err = fmt.Errorf("Signal '%v' is not supported.", sig)
err = fmt.Errorf("Signal '%v' is not supported", sig)
return
}