panic if NewCommand errors on NewServer

This commit is contained in:
Matthew Jaffee 2018-04-19 15:37:08 -05:00
parent 876ed56e30
commit 23f6acc165
No known key found for this signature in database
GPG key ID: 51C676AF9FFCDB87

View file

@ -80,7 +80,11 @@ type Command struct {
// NewCommand returns a new instance of Main.
func NewCommand(stdin io.Reader, stdout, stderr io.Writer) *Command {
s, _ := pilosa.NewServer()
s, err := pilosa.NewServer()
if err != nil {
panic(err)
}
return &Command{
Server: s,
Config: NewConfig(),