Preparing report...

Report for github.com/micro/go-os

A+    Excellent!    Found 62 issues across 94 files

Tweet

gofmt92%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

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!


gocyclo98%

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.


golint41%

Golint is a linter for Go source code.

    • go-os/config/source/memory/memory.go
    • Line 13: warning: exported type Source should have comment or be unexported (golint)
    • Line 31: warning: exported method Source.Watch should have comment or be unexported (golint)
    • Line 74: warning: exported function NewSource should have comment or be unexported (golint)
    • go-os/metrics/metrics.go
    • Line 8: warning: exported type Fields should have comment or be unexported (golint)
    • Line 21: warning: exported type Counter should have comment or be unexported (golint)
    • Line 32: warning: exported type Gauge should have comment or be unexported (golint)
    • Line 41: warning: exported type Histogram should have comment or be unexported (golint)
    • Line 50: warning: exported type Option should have comment or be unexported (golint)
    • Line 53: warning: exported var DefaultNamespace should have comment or be unexported (golint)
    • go-os/discovery/context.go
    • Line 9: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 14: warning: exported function NewContext should have comment or be unexported (golint)
    • go-os/config/options.go
    • Line 11: warning: exported type Options should have comment or be unexported (golint)
    • Line 18: warning: exported type SourceOptions should have comment or be unexported (golint)
    • Line 47: warning: exported function WithClient should have comment or be unexported (golint)
    • Line 72: warning: exported function SourceClient should have comment or be unexported (golint)
    • Line 78: warning: exported function SourceHosts should have comment or be unexported (golint)
    • go-os/kv/context.go
    • Line 9: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 14: warning: exported function NewContext should have comment or be unexported (golint)
    • go-os/db/options.go
    • Line 8: warning: exported type Options should have comment or be unexported (golint)
    • Line 18: warning: exported type SearchOptions should have comment or be unexported (golint)
    • Line 24: warning: exported function Database should have comment or be unexported (golint)
    • Line 30: warning: exported function Table should have comment or be unexported (golint)
    • Line 36: warning: exported function Client should have comment or be unexported (golint)
    • Line 44: warning: exported function WithMetadata should have comment or be unexported (golint)
    • Line 50: warning: exported function WithLimit should have comment or be unexported (golint)
    • Line 56: warning: exported function WithOffset should have comment or be unexported (golint)
    • go-os/router/context.go
    • Line 9: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 14: warning: exported function NewContext should have comment or be unexported (golint)
    • go-os/router/options.go
    • Line 9: warning: exported function Client should have comment or be unexported (golint)
    • Line 15: warning: exported function Server should have comment or be unexported (golint)
    • go-os/kv/kv.go
    • Line 10: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 13: warning: exported type KV should have comment or be unexported (golint)
    • Line 21: warning: exported type Item should have comment or be unexported (golint)
    • Line 27: warning: exported type Option should have comment or be unexported (golint)
    • Line 29: warning: exported function NewKV should have comment or be unexported (golint)
    • go-os/monitor/monitor.go
    • Line 11: warning: comment on exported type Monitor should be of the form "Monitor ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported type HealthChecker should be of the form "HealthChecker ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported type Stats should be of the form "Stats ..." (with optional leading article) (golint)
    • Line 48: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 54: warning: exported type HealthCheck should have comment or be unexported (golint)
    • Line 56: warning: exported type Option should have comment or be unexported (golint)
    • Line 58: warning: exported type Options should have comment or be unexported (golint)
    • Line 65: warning: exported var HealthCheckTopic should have comment or be unexported (golint)
    • Line 70: warning: exported function ClientWrapper should have comment or be unexported (golint)
    • Line 76: warning: exported function HandlerWrapper should have comment or be unexported (golint)
    • Line 82: warning: exported function NewMonitor should have comment or be unexported (golint)
    • go-os/discovery/discovery.go
    • Line 10: warning: exported const HeartbeatTopic should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported function NewDiscovery should have comment or be unexported (golint)
    • Line 27: warning: exported function NewRegistry should have comment or be unexported (golint)
    • go-os/config/context.go
    • Line 9: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 14: warning: exported function NewContext should have comment or be unexported (golint)
    • go-os/event/event.go
    • Line 8: warning: exported type Event should have comment or be unexported (golint)
    • Line 17: warning: exported type Record should have comment or be unexported (golint)
    • Line 27: warning: exported type Handler should have comment or be unexported (golint)
    • Line 30: warning: exported var RecordTopic should have comment or be unexported (golint)
    • Line 34: warning: exported type Option should have comment or be unexported (golint)
    • Line 36: warning: exported function NewEvent should have comment or be unexported (golint)
    • go-os/config/source/memory/watcher.go
    • Line 7: warning: exported type Watcher should have comment or be unexported (golint)
    • Line 13: warning: exported method Watcher.Next should have comment or be unexported (golint)
    • Line 18: warning: exported method Watcher.Stop should have comment or be unexported (golint)
    • go-os/monitor/options.go
    • Line 10: warning: exported function Interval should have comment or be unexported (golint)
    • Line 16: warning: exported function Client should have comment or be unexported (golint)
    • Line 22: warning: exported function Server should have comment or be unexported (golint)
    • go-os/event/context.go
    • Line 9: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 14: warning: exported function NewContext should have comment or be unexported (golint)
    • go-os/log/options.go
    • Line 7: warning: exported type Options should have comment or be unexported (golint)
    • Line 19: warning: exported type OutputOptions should have comment or be unexported (golint)
    • Line 26: warning: exported function WithLevel should have comment or be unexported (golint)
    • Line 32: warning: exported function WithOutput should have comment or be unexported (golint)
    • Line 38: warning: exported function WithFields should have comment or be unexported (golint)
    • Line 46: warning: exported function OutputName should have comment or be unexported (golint)
    • go-os/monitor/context.go
    • Line 9: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 14: warning: exported function NewContext should have comment or be unexported (golint)
    • go-os/metrics/options.go
    • Line 7: warning: exported type Options should have comment or be unexported (golint)
    • Line 14: warning: exported function BatchInterval should have comment or be unexported (golint)
    • Line 20: warning: exported function Collectors should have comment or be unexported (golint)
    • Line 26: warning: exported function Namespace should have comment or be unexported (golint)
    • Line 32: warning: exported function WithFields should have comment or be unexported (golint)
    • go-os/trace/options.go
    • Line 10: warning: exported type Options should have comment or be unexported (golint)
    • Line 21: warning: exported function BatchSize should have comment or be unexported (golint)
    • Line 27: warning: exported function BatchInterval should have comment or be unexported (golint)
    • Line 33: warning: exported function Collectors should have comment or be unexported (golint)
    • Line 39: warning: exported function Topic should have comment or be unexported (golint)
    • Line 45: warning: exported function Service should have comment or be unexported (golint)
    • Line 51: warning: exported function Client should have comment or be unexported (golint)
    • Line 57: warning: exported function CollectTimeout should have comment or be unexported (golint)
    • go-os/log/context.go
    • Line 9: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 14: warning: exported function NewContext should have comment or be unexported (golint)
    • go-os/auth/util.go
    • Line 7: warning: exported function TokenFromHeader should have comment or be unexported (golint)
    • Line 34: warning: exported function HeaderWithToken should have comment or be unexported (golint)
    • go-os/sync/context.go
    • Line 9: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 14: warning: exported function NewContext should have comment or be unexported (golint)
    • go-os/log/log.go
    • Line 9: warning: exported const DebugLevel should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type Level should have comment or be unexported (golint)
    • Line 18: warning: exported type Fields should have comment or be unexported (golint)
    • Line 20: warning: comment on exported type Log should be of the form "Log ..." (with optional leading article) (golint)
    • Line 29: warning: exported type Logger should have comment or be unexported (golint)
    • Line 55: warning: comment on exported type Output should be of the form "Output ..." (with optional leading article) (golint)
    • Line 67: warning: exported type Option should have comment or be unexported (golint)
    • Line 69: warning: exported type OutputOption should have comment or be unexported (golint)
    • Line 72: warning: exported var DefaultLevel should have comment or be unexported (golint)
    • Line 84: warning: exported method Event.MarshalJSON should have comment or be unexported (golint)
    • Line 98: warning: exported function NewLog should have comment or be unexported (golint)
    • go-os/auth/auth.go
    • Line 29: warning: exported type Option should have comment or be unexported (golint)
    • Line 31: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 37: warning: comment on exported type Token should be of the form "Token ..." (with optional leading article) (golint)
    • Line 48: warning: exported var ErrInvalidToken should have comment or be unexported (golint)
    • Line 51: warning: exported function ClientWrapper should have comment or be unexported (golint)
    • Line 57: warning: exported function HandlerWrapper should have comment or be unexported (golint)
    • Line 63: warning: exported function NewAuth should have comment or be unexported (golint)
    • go-os/auth/options.go
    • Line 8: warning: exported type Options should have comment or be unexported (golint)
    • Line 16: warning: exported function Client should have comment or be unexported (golint)
    • Line 22: warning: exported function Id should have comment or be unexported (golint)
    • Line 28: warning: exported function Secret should have comment or be unexported (golint)
    • go-os/config/config.go
    • Line 38: warning: comment on exported type Value should be of the form "Value ..." (with optional leading article) (golint)
    • Line 63: warning: exported type Watcher should have comment or be unexported (golint)
    • Line 99: warning: exported type Option should have comment or be unexported (golint)
    • Line 101: warning: exported type SourceOption should have comment or be unexported (golint)
    • Line 104: warning: exported var DefaultPollInterval should have comment or be unexported (golint)
    • Line 108: warning: exported function NewConfig should have comment or be unexported (golint)
    • go-os/db/context.go
    • Line 9: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 14: warning: exported function NewContext should have comment or be unexported (golint)
    • go-os/auth/context.go
    • Line 10: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 15: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 19: warning: exported function TokenFromContext should have comment or be unexported (golint)
    • Line 24: warning: exported function ContextWithToken should have comment or be unexported (golint)
    • go-os/trace/trace.go
    • Line 14: warning: exported const AnnUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported type AnnotationType should have comment or be unexported (golint)
    • Line 28: warning: exported type Trace should have comment or be unexported (golint)
    • Line 39: warning: exported type Span should have comment or be unexported (golint)
    • Line 55: warning: exported type Annotation should have comment or be unexported (golint)
    • Line 64: warning: exported type Option should have comment or be unexported (golint)
    • Line 67: warning: exported var DefaultBatchSize should have comment or be unexported (golint)
    • Line 77: warning: exported function ClientWrapper should have comment or be unexported (golint)
    • Line 83: warning: exported function HandlerWrapper should have comment or be unexported (golint)
    • Line 89: warning: exported function NewTrace should have comment or be unexported (golint)
    • go-os/trace/util.go
    • Line 7: warning: exported function SpanFromHeader should have comment or be unexported (golint)
    • Line 27: warning: exported function HeaderWithSpan should have comment or be unexported (golint)
    • go-os/router/router.go
    • Line 11: warning: comment on exported type Router should be of the form "Router ..." (with optional leading article) (golint)
    • Line 25: warning: exported type Stats should have comment or be unexported (golint)
    • Line 35: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 42: warning: exported var StatsTopic should have comment or be unexported (golint)
    • Line 46: warning: exported function NewRouter should have comment or be unexported (golint)
    • go-os/db/db.go
    • Line 4: warning: exported type DB should have comment or be unexported (golint)
    • Line 16: warning: exported type Option should have comment or be unexported (golint)
    • Line 18: warning: exported type SearchOption should have comment or be unexported (golint)
    • Line 20: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 22: warning: exported type Record should have comment or be unexported (golint)
    • Line 32: warning: exported var DefaultDatabase should have comment or be unexported (golint)
    • Line 36: warning: exported function NewDB should have comment or be unexported (golint)
    • Line 40: warning: exported function NewRecord should have comment or be unexported (golint)
    • go-os/router/os.go
    • Line 172: warning: should omit 2nd value from range; this loop is equivalent to `for name := range ...` (golint)
    • Line 229: warning: should omit 2nd value from range; this loop is equivalent to `for node := range ...` (golint)
    • go-os/kv/os.go
    • Line 38: warning: exported type Announcement should have comment or be unexported (golint)
    • Line 49: warning: exported var GossipTopic should have comment or be unexported (golint)
    • Line 105: warning: exported method Announcement.Topic should have comment or be unexported (golint)
    • Line 109: warning: exported method Announcement.Message should have comment or be unexported (golint)
    • Line 113: warning: exported method Announcement.ContentType should have comment or be unexported (golint)
    • go-os/sync/options.go
    • Line 9: warning: exported type Options should have comment or be unexported (golint)
    • Line 15: warning: exported type LockOptions should have comment or be unexported (golint)
    • Line 20: warning: exported type LeaderOptions should have comment or be unexported (golint)
    • Line 22: warning: exported function Namespace should have comment or be unexported (golint)
    • Line 28: warning: exported function Nodes should have comment or be unexported (golint)
    • Line 34: warning: exported function Service should have comment or be unexported (golint)
    • Line 40: warning: exported function LockTTL should have comment or be unexported (golint)
    • Line 46: warning: exported function LockWait should have comment or be unexported (golint)
    • go-os/sync/sync.go
    • Line 9: warning: exported const FollowerStatus should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type LeaderStatus should have comment or be unexported (golint)
    • Line 16: warning: exported type Sync should have comment or be unexported (golint)
    • Line 25: warning: exported type Lock should have comment or be unexported (golint)
    • Line 34: warning: exported type Leader should have comment or be unexported (golint)
    • Line 45: warning: exported type Elected should have comment or be unexported (golint)
    • Line 53: warning: exported type Option should have comment or be unexported (golint)
    • Line 55: warning: exported type LockOption should have comment or be unexported (golint)
    • Line 57: warning: exported type LeaderOption should have comment or be unexported (golint)
    • Line 60: warning: exported var DefaultNamespace should have comment or be unexported (golint)
    • go-os/trace/context.go
    • Line 10: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 15: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 19: warning: exported function SpanFromContext should have comment or be unexported (golint)
    • Line 24: warning: exported function ContextWithSpan should have comment or be unexported (golint)
    • go-os/kv/options.go
    • Line 12: warning: exported type Options should have comment or be unexported (golint)
    • Line 37: warning: exported function Servers should have comment or be unexported (golint)
    • Line 43: warning: exported function Namespace should have comment or be unexported (golint)
    • Line 49: warning: exported function Client should have comment or be unexported (golint)
    • Line 55: warning: exported function Server should have comment or be unexported (golint)
    • go-os/metrics/context.go
    • Line 9: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 14: warning: exported function NewContext should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words