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.
-
golang-discovery-client/tools/cmd/discover/monitor.go
- Line 10: warning: exported type Category should have comment or be unexported (golint)
- Line 11: warning: exported type Categories should have comment or be unexported (golint)
- Line 27: warning: exported type MonitorEvent should have comment or be unexported (golint)
- Line 32: warning: exported type Monitor should have comment or be unexported (golint)
- Line 38: warning: exported function NewMonitor should have comment or be unexported (golint)
- Line 111: warning: exported method Monitor.Run should have comment or be unexported (golint)
- Line 133: warning: exported method Monitor.ServicesChanged should have comment or be unexported (golint)
-
golang-discovery-client/service/discovery.go
- Line 20: warning: exported const DefaultWatchPollInterval should have comment (or a comment on this block) or be unexported (golint)
- Line 24: warning: exported var ErrorNotRunning should have comment or be unexported (golint)
- Line 82: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 87: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 94: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 108: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 119: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 127: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 131: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 135: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 144: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
- Line 147: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 153: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 159: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 167: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 177: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 194: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 206: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 245: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 262: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 334: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 350: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
-
golang-discovery-client/service/instances.go
- Line 15: warning: comment on exported method Instances.Len should be of the form "Len ..." (golint)
- Line 16: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 42: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 54: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
- Line 65: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
-
golang-discovery-client/service/support_test.go
- Line 60: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 68: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 76: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 82: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 94: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
-
golang-discovery-client/service/watcher.go
- Line 27: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 49: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 62: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 93: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 97: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
- Line 107: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 113: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
- Line 122: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 128: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
- Line 138: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 145: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
- Line 222: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 226: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 232: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 237: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 243: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words
No problems detected. Good job!