DEV 1666: Fix /end requests and clean up logging (#109)

* ensure /end request is always called, and refactor win/draw logic

* clean up logging and error handling during initialization

* automatically generate friendly snake names

* title-case snake names

* print out list of alive snake names instead of count

* log snake names, IDs, and URLs at startup

* print out state for turn zero
This commit is contained in:
Rob O'Dwyer 2022-09-02 14:35:55 -07:00 committed by GitHub
parent 006f394355
commit 09aea9c49d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 317 additions and 151 deletions

View file

@ -1,9 +1,8 @@
package commands
import (
"log"
"github.com/spf13/cobra"
log "github.com/spf13/jwalterweatherman"
)
func NewMapCommand() *cobra.Command {
@ -15,7 +14,7 @@ func NewMapCommand() *cobra.Command {
Run: func(cmd *cobra.Command, args []string) {
err := cmd.Help()
if err != nil {
log.Fatal(err)
log.ERROR.Fatal(err)
}
},
}