Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
go vet
examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.
No problems detected. Good job!
Gocyclo calculates cyclomatic complexities of functions in Go source code.
The cyclomatic complexity of a function is calculated according to the following rules:
1 is the base complexity of a function
+1 for each 'if', 'for', 'case', '&&' or '||'
Go Report Card warns on functions with cyclomatic complexity > 15.
Golint is a linter for Go source code.
-
prometheus-ha-proxy/merger/merge.go
- Line 10: warning: exported type Output should have comment or be unexported (golint)
- Line 15: warning: exported type Data should have comment or be unexported (golint)
- Line 20: warning: exported type Result should have comment or be unexported (golint)
- Line 26: warning: exported type Values should have comment or be unexported (golint)
- Line 32: warning: receiver name s should be consistent with previous receiver name v for Values (golint)
- Line 35: warning: receiver name s should be consistent with previous receiver name v for Values (golint)
- Line 39: warning: comment on exported function MergeNaively should be of the form "MergeNaively ..." (golint)
- Line 44: warning: don't use underscores in Go names; var msg_type should be msgType (golint)
- Line 45: warning: don't use underscores in Go names; var data_msg should be dataMsg (golint)
- Line 47: warning: don't use underscores in Go names; var meta_data should be metaData (golint)
- Line 57: warning: don't use underscores in Go names; var tmp_result should be tmpResult (golint)
- Line 136: warning: don't use underscores in Go names; func parameter data_msg should be dataMsg (golint)
-
prometheus-ha-proxy/main.go
- Line 30: warning: exported type BackendOutput should have comment or be unexported (golint)
- Line 35: warning: exported type PromData should have comment or be unexported (golint)
- Line 40: warning: exported type Endpoint should have comment or be unexported (golint)
- Line 46: warning: exported method Endpoint.Set should have comment or be unexported (golint)
- Line 53: warning: exported method Endpoint.Disable should have comment or be unexported (golint)
- Line 59: warning: exported method Endpoint.Enable should have comment or be unexported (golint)
- Line 76: warning: don't use underscores in Go names; var my_url should be myURL (golint)
- Line 96: warning: exported method PromData.EndpointsProbe should have comment or be unexported (golint)
- Line 120: warning: exported method PromData.PrometheusProxy should have comment or be unexported (golint)
- Line 155: warning: exported function PromGet should have comment or be unexported (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
Misspell Finds commonly misspelled English words
No problems detected. Good job!