M .build.yml => .build.yml +1 -1
@@ 13,7 13,7 @@ tasks:
curl https://golang.org/dl/go1.16.linux-amd64.tar.gz -o go1.16.linux-amd64.tar.gz -L
sudo tar -C /usr/local -xzf go1.16.linux-amd64.tar.gz
go get -u golang.org/x/lint/golint
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.36.0
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.37.1
cd gemif
make init
- lint: |
M Makefile => Makefile +1 -1
@@ 82,7 82,7 @@ nonmegalint: ## do a regular golint
golint $(shell go list ./...)
megalint: ## Run several linters in parallel (requires docker)
- docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.36.0 golangci-lint run
+ docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.37 golangci-lint run
# Non-docker golangci-lint for running in CI without docker available
megalintci:
M cmd/gemif/main.go => cmd/gemif/main.go +4 -4
@@ 14,10 14,10 @@ import (
//nolint:gochecknoglobals
var (
- appName string = "GemIF"
- appVersion string = "0.0.0"
- appCommit string = "local"
- buildTime string = "just now!"
+ appName = "GemIF"
+ appVersion = "0.0.0"
+ appCommit = "local"
+ buildTime = "just now!"
)
func main() {
M cmd/gemifc/filemanager.go => cmd/gemifc/filemanager.go +2 -0
@@ 75,6 75,8 @@ func processFile(path string) ([]gamemanager.Room, error) {
currentRoom.Description = roomParser.getRoomDescription(room)
fileRooms = append(fileRooms, currentRoom)
+
+ //nolint:exhaustivestruct
currentRoom = gamemanager.Room{}
}
M cmd/gemifc/main.go => cmd/gemifc/main.go +4 -4
@@ 13,10 13,10 @@ import (
//nolint:gochecknoglobals
var (
- appName string = "GemIFC"
- appVersion string = "0.0.0"
- appCommit string = "local"
- buildTime string = "just now!"
+ appName = "GemIFC"
+ appVersion = "0.0.0"
+ appCommit = "local"
+ buildTime = "just now!"
)
func main() {
M go.sum => go.sum +1 -0
@@ 41,6 41,7 @@ github.com/pitr/gig v0.9.8/go.mod h1:YHUShtPtgG/zAsdlVG2HyzfGA1EKB+QBVFKxJ2qzxhU
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
M pkg/gamemanager/gamemanager.go => pkg/gamemanager/gamemanager.go +1 -0
@@ 103,6 103,7 @@ func (gm *GameManager) DeserializeState(stateToken string) (GameState, error) {
// SerializeState generates a stateToken based on the given GameState.
func (gm *GameManager) SerializeState(gameState GameState) (string, error) {
+ //nolint:exhaustivestruct
st := StateToken{
StoryID: gameState.StoryID,
CurrentRoom: gameState.CurrentRoom,