Preparing report...

Report for github.com/micro/examples

A+    Excellent!    Found 53 issues across 103 files

Tweet

gofmt96%

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!


gocyclo100%

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.

No problems detected. Good job!


golint48%

Golint is a linter for Go source code.

    • examples/booking/api/hotel/main.go
    • Line 28: warning: exported const BASIC_SCHEMA should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: exported type Hotel should have comment or be unexported (golint)
    • Line 46: warning: exported method Hotel.Rates should have comment or be unexported (golint)
    • Line 147: warning: context.Context should be the first parameter of a function (golint)
    • Line 163: warning: context.Context should be the first parameter of a function (golint)
    • examples/pubsub/srv/main.go
    • Line 13: warning: comment on exported type Sub should be of the form "Sub ..." (with optional leading article) (golint)
    • Line 17: warning: comment on exported method Sub.Process should be of the form "Process ..." (golint)
    • examples/api/meta/meta.go
    • Line 16: warning: exported type Example should have comment or be unexported (golint)
    • Line 18: warning: exported type Foo should have comment or be unexported (golint)
    • Line 20: warning: comment on exported method Example.Call should be of the form "Call ..." (golint)
    • Line 34: warning: comment on exported method Foo.Bar should be of the form "Bar ..." (golint)
    • examples/greeter/api/beego/beego.go
    • Line 15: warning: exported type Say should have comment or be unexported (golint)
    • Line 21: warning: exported method Say.Anything should have comment or be unexported (golint)
    • Line 28: warning: exported method Say.Hello should have comment or be unexported (golint)
    • examples/sharding/api.go
    • Line 17: warning: exported type Say should have comment or be unexported (golint)
    • Line 21: warning: exported method Say.Hello should have comment or be unexported (golint)
    • examples/helloworld/main.go
    • Line 11: warning: exported type Greeter should have comment or be unexported (golint)
    • Line 13: warning: exported method Greeter.Hello should have comment or be unexported (golint)
    • examples/function/main.go
    • Line 10: warning: exported type Greeter should have comment or be unexported (golint)
    • Line 12: warning: exported method Greeter.Hello should have comment or be unexported (golint)
    • examples/roundrobin/api.go
    • Line 17: warning: exported type Say should have comment or be unexported (golint)
    • Line 21: warning: exported method Say.Hello should have comment or be unexported (golint)
    • examples/server/codegen/codegen.go
    • Line 14: warning: exported type Example should have comment or be unexported (golint)
    • Line 16: warning: exported method Example.Call should have comment or be unexported (golint)
    • Line 22: warning: exported method Example.Stream should have comment or be unexported (golint)
    • Line 37: warning: exported method Example.PingPong should have comment or be unexported (golint)
    • examples/event/srv/main.go
    • Line 11: warning: comment on exported type Event should be of the form "Event ..." (with optional leading article) (golint)
    • Line 14: warning: comment on exported method Event.Process should be of the form "Process ..." (golint)
    • examples/greeter/api/rest/rest.go
    • Line 14: warning: exported type Say should have comment or be unexported (golint)
    • Line 20: warning: exported method Say.Anything should have comment or be unexported (golint)
    • Line 27: warning: exported method Say.Hello should have comment or be unexported (golint)
    • examples/server/handler/example.go
    • Line 13: warning: exported type Example should have comment or be unexported (golint)
    • Line 15: warning: exported method Example.Call should have comment or be unexported (golint)
    • Line 22: warning: exported method Example.Stream should have comment or be unexported (golint)
    • Line 47: warning: exported method Example.PingPong should have comment or be unexported (golint)
    • examples/service/main.go
    • Line 19: warning: exported type Greeter should have comment or be unexported (golint)
    • Line 21: warning: exported method Greeter.Hello should have comment or be unexported (golint)
    • examples/redirect/main.go
    • Line 11: warning: exported type Redirect should have comment or be unexported (golint)
    • Line 13: warning: exported method Redirect.Url should have comment or be unexported (golint)
    • examples/stream/server/main.go
    • Line 13: warning: exported type Streamer should have comment or be unexported (golint)
    • Line 15: warning: comment on exported method Streamer.ServerStream should be of the form "ServerStream ..." (golint)
    • Line 27: warning: comment on exported method Streamer.Stream should be of the form "Stream ..." (golint)
    • examples/wrapper/main.go
    • Line 13: warning: exported type Greeter should have comment or be unexported (golint)
    • Line 15: warning: exported method Greeter.Hello should have comment or be unexported (golint)
    • examples/form/api/main.go
    • Line 17: warning: exported type Form should have comment or be unexported (golint)
    • Line 19: warning: exported method Form.Submit should have comment or be unexported (golint)
    • Line 24: warning: exported method Form.Multipart should have comment or be unexported (golint)
    • examples/server/subscriber/subscriber.go
    • Line 10: warning: exported type Example should have comment or be unexported (golint)
    • Line 12: warning: exported method Example.Handle should have comment or be unexported (golint)
    • Line 17: warning: exported function Handler should have comment or be unexported (golint)
    • examples/api/api/api.go
    • Line 15: warning: exported type Example should have comment or be unexported (golint)
    • Line 17: warning: exported type Foo should have comment or be unexported (golint)
    • Line 19: warning: comment on exported method Example.Call should be of the form "Call ..." (golint)
    • Line 46: warning: comment on exported method Foo.Bar should be of the form "Bar ..." (golint)
    • examples/getip/main.go
    • Line 12: warning: exported type Greeter should have comment or be unexported (golint)
    • Line 14: warning: exported method Greeter.Hello should have comment or be unexported (golint)
    • examples/greeter/api/gin/gin.go
    • Line 13: warning: exported type Say should have comment or be unexported (golint)
    • Line 19: warning: exported method Say.Anything should have comment or be unexported (golint)
    • Line 26: warning: exported method Say.Hello should have comment or be unexported (golint)
    • examples/noproto/main.go
    • Line 9: warning: exported type Greeter should have comment or be unexported (golint)
    • Line 11: warning: exported method Greeter.Hello should have comment or be unexported (golint)
    • examples/template/api/client/example.go
    • Line 13: warning: comment on exported function ExampleFromContext should be of the form "ExampleFromContext ..." (golint)
    • Line 19: warning: comment on exported function ExampleWrapper should be of the form "ExampleWrapper ..." (golint)
    • examples/api/rpc/rpc.go
    • Line 13: warning: exported type Example should have comment or be unexported (golint)
    • Line 15: warning: exported type Foo should have comment or be unexported (golint)
    • Line 17: warning: comment on exported method Example.Call should be of the form "Call ..." (golint)
    • Line 31: warning: comment on exported method Foo.Bar should be of the form "Bar ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!