brianstrauch / spotify-cli

Spotify for the terminal
Apache License 2.0
317 stars 16 forks source link

Add lint job to Github actions and fixed lint errors #36

Closed urbanc closed 3 years ago

urbanc commented 3 years ago

I just add a new Github action for Go lint in the test.yml. For more info on how golangci-lint works you can check https://golangci-lint.run/usage/quick-start/.

There were a few lint errors that have been fixed but I'm not quite sure about these fixes.

Fixed next lint errors: internal/login/login.go:122:19: Error return value of server.Shutdown is not checked (errcheck) main.go:30:23: Error return value of viper.SafeWriteConfig is not checked (errcheck) main.go:31:20: Error return value of viper.ReadInConfig is not checked (errcheck) main.go:63:14: Error return value of root.Execute is not checked (errcheck) internal/play/play.go:52:3: ineffectual assignment to err (ineffassign) internal/common.go:51:10: SA1015: using time.Tick leaks the underlying ticker, consider using it only in endless functions, tests and the main package, and use time.NewTicker here (staticcheck)

brianstrauch commented 3 years ago

@urbanc Run go mod tidy, and then I'll merge. Thanks so much for the PR! :tada: