Golint would suggest: example.go:20:9: if block ends with a return statement, so drop this else and outdent its block Here it points out that in the file example.go at line 20 there is an if/else block ending with a return and suggests an improvement.