fix comment typos

This commit is contained in:
Matt Jaffee 2018-07-10 16:38:55 -05:00
parent b7e5f8842e
commit c2c1910671
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF
3 changed files with 6 additions and 6 deletions

View file

@ -111,7 +111,7 @@ func OptHandlerListener(ln net.Listener) handlerOption {
}
}
// OptHandlerCloseTimeout controls how long we'll wait for the http Server to
// OptHandlerCloseTimeout controls how long to wait for the http Server to
// shutdown cleanly before forcibly destroying it. Default is 30 seconds.
func OptHandlerCloseTimeout(d time.Duration) handlerOption {
return func(h *Handler) error {

View file

@ -381,14 +381,14 @@ func (s *Server) Close() error {
if s.translateFile != nil {
errt = s.translateFile.Close()
}
// prefer to return handler error over translateFile error over cluster
// prefer to return holder error over translateFile error over cluster
// error. This order is somewhat arbitrary. It would be better if we had
// some way to combine all the errors, but probably not important enough to
// warrant the extra complexity.
if errh != nil {
return errors.Wrap(errh, "closing handler")
} else if errt != nil {
return errors.Wrap(errt, "closing translatFile")
return errors.Wrap(errt, "closing translateFile")
}
return errors.Wrap(errc, "closing cluster")
}

View file

@ -57,9 +57,9 @@ func newCommand(opts ...server.CommandOption) *Command {
}
// set aggressive close timeout by default to avoid hanging tests. This was
// a probably with PDK tests which used go-pilosa as well. We put it at the
// beginning of the option slice so that it can be overridden by an
// user-passed options.
// a problem with PDK tests which used go-pilosa as well. We put it at the
// beginning of the option slice so that it can be overridden by user-passed
// options.
opts = append([]server.CommandOption{server.OptCommandCloseTimeout(time.Millisecond * 2)}, opts...)
m := &Command{Command: server.NewCommand(os.Stdin, os.Stdout, os.Stderr, opts...), commandOptions: opts}
m.Config.DataDir = path