Preparing report...

Report for github.com/rizalgowandy/gdk

A+    Excellent!    Found 37 issues across 159 files

Tweet

gofmt100%

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

No problems detected. Good job!


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.

    • gdk/pkg/httpx/mux/bind.go
    • Line 123: warning: cyclomatic complexity 23 of function bindData() is high (> 15) (gocyclo)
    • Line 239: warning: cyclomatic complexity 18 of function setWithProperType() is high (> 15) (gocyclo)
    • Line 30: warning: cyclomatic complexity 17 of function Bind() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • gdk/pkg/benchmark/uniform.go
    • Line 11: warning: exported type Uniform should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function NewUniform should be of the form "NewUniform ..." (golint)
    • Line 24: warning: exported method Uniform.Name should have comment or be unexported (golint)
    • Line 28: warning: exported method Uniform.Next should have comment or be unexported (golint)
    • gdk/pkg/netx/ip_address.go
    • Line 17: warning: exported function GetIPv4 should have comment or be unexported (golint)
    • Line 44: warning: exported function GetIPv16 should have comment or be unexported (golint)
    • gdk/pkg/queue/nsqx/consumer_controller.go
    • Line 13: warning: exported const TimeoutDuration should have comment or be unexported (golint)
    • Line 15: warning: exported type ConsumerController should have comment or be unexported (golint)
    • Line 20: warning: exported type ConsumerParam should have comment or be unexported (golint)
    • Line 27: warning: exported function NewConsumerController should have comment or be unexported (golint)
    • Line 34: warning: exported method ConsumerController.AddConsumers should have comment or be unexported (golint)
    • Line 76: warning: exported method ConsumerController.Serve should have comment or be unexported (golint)
    • gdk/pkg/converter/array.go
    • Line 54: warning: comment on exported function ArrStr should be of the form "ArrStr ..." (golint)
    • Line 77: warning: comment on exported function ArrInt64 should be of the form "ArrInt64 ..." (golint)
    • gdk/pkg/logx/pgx.go
    • Line 10: warning: exported function NewPGX should have comment or be unexported (golint)
    • Line 14: warning: exported type PGX should have comment or be unexported (golint)
    • Line 16: warning: exported method PGX.Log should have comment or be unexported (golint)
    • gdk/pkg/pprofx/pprofx.go
    • Line 15: warning: exported const SleepDuration should have comment or be unexported (golint)
    • Line 17: warning: exported function New should have comment or be unexported (golint)
    • Line 45: warning: exported function Summary should have comment or be unexported (golint)
    • gdk/pkg/benchmark/hotspot.go
    • Line 11: warning: exported type Hotspot should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function NewHotspot should be of the form "NewHotspot ..." (golint)
    • Line 24: warning: exported method Hotspot.Name should have comment or be unexported (golint)
    • Line 28: warning: exported method Hotspot.Next should have comment or be unexported (golint)
    • gdk/pkg/benchmark/scrambled_zipfian.go
    • Line 11: warning: exported type ScrambledZipfian should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function NewScrambledZipfian should be of the form "NewScrambledZipfian ..." (golint)
    • Line 24: warning: exported method ScrambledZipfian.Name should have comment or be unexported (golint)
    • Line 28: warning: exported method ScrambledZipfian.Next should have comment or be unexported (golint)
    • gdk/pkg/jsonx/jsonx.go
    • Line 43: warning: comment on exported function Marshal should be of the form "Marshal ..." (golint)
    • Line 48: warning: comment on exported function Unmarshal should be of the form "Unmarshal ..." (golint)
    • gdk/pkg/cronx/example/without-library-server/main.go
    • Line 18: warning: exported type SendEmail should have comment or be unexported (golint)
    • Line 20: warning: exported method SendEmail.Run should have comment or be unexported (golint)
    • Line 25: warning: exported type PayBill should have comment or be unexported (golint)
    • Line 27: warning: exported method PayBill.Run should have comment or be unexported (golint)
    • Line 32: warning: exported type AlwaysError should have comment or be unexported (golint)
    • Line 34: warning: exported method AlwaysError.Run should have comment or be unexported (golint)
    • Line 40: warning: exported type EveryJob should have comment or be unexported (golint)
    • Line 42: warning: exported method EveryJob.Run should have comment or be unexported (golint)
    • Line 47: warning: exported type Subscription should have comment or be unexported (golint)
    • Line 49: warning: exported method Subscription.Run should have comment or be unexported (golint)
    • Line 115: warning: exported function RegisterJobs should have comment or be unexported (golint)
    • gdk/pkg/cronx/job.go
    • Line 13: warning: exported type JobItf should have comment or be unexported (golint)
    • Line 17: warning: exported type Job should have comment or be unexported (golint)
    • Line 30: warning: exported type JobMetadata should have comment or be unexported (golint)
    • gdk/pkg/cronx/example/with-library-server/main.go
    • Line 15: warning: exported type SendEmail should have comment or be unexported (golint)
    • Line 17: warning: exported method SendEmail.Run should have comment or be unexported (golint)
    • Line 22: warning: exported type PayBill should have comment or be unexported (golint)
    • Line 24: warning: exported method PayBill.Run should have comment or be unexported (golint)
    • Line 29: warning: exported type AlwaysError should have comment or be unexported (golint)
    • Line 31: warning: exported method AlwaysError.Run should have comment or be unexported (golint)
    • Line 37: warning: exported type EveryJob should have comment or be unexported (golint)
    • Line 39: warning: exported method EveryJob.Run should have comment or be unexported (golint)
    • Line 44: warning: exported type Subscription should have comment or be unexported (golint)
    • Line 46: warning: exported method Subscription.Run should have comment or be unexported (golint)
    • Line 92: warning: exported function RegisterJobs should have comment or be unexported (golint)
    • gdk/pkg/queue/nsqx/configuration.go
    • Line 8: warning: exported type ProducerConfiguration should have comment or be unexported (golint)
    • Line 14: warning: exported method ProducerConfiguration.Validate should have comment or be unexported (golint)
    • Line 27: warning: exported type ConsumerConfiguration should have comment or be unexported (golint)
    • Line 35: warning: exported method ConsumerConfiguration.Validate should have comment or be unexported (golint)
    • gdk/pkg/benchmark/generator.go
    • Line 3: warning: exported type NewGeneratorFunc should have comment or be unexported (golint)
    • Line 5: warning: exported type Generator should have comment or be unexported (golint)
    • gdk/pkg/logx/logx.go
    • Line 12: warning: exported type Config should have comment or be unexported (golint)
    • Line 34: warning: exported function New should have comment or be unexported (golint)
    • Line 53: warning: exported function TRC should have comment or be unexported (golint)
    • Line 60: warning: exported function DBG should have comment or be unexported (golint)
    • Line 67: warning: exported function INF should have comment or be unexported (golint)
    • Line 74: warning: exported function WRN should have comment or be unexported (golint)
    • Line 81: warning: exported function ERR should have comment or be unexported (golint)
    • Line 88: warning: exported function FTL should have comment or be unexported (golint)
    • gdk/pkg/httpx/mux/response_writer.go
    • Line 10: warning: exported type Writer should have comment or be unexported (golint)
    • Line 19: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 23: warning: exported method Writer.WriteHeader should have comment or be unexported (golint)
    • gdk/pkg/queue/nsqx/example/consumer/main.go
    • Line 12: warning: exported type SendEmail should have comment or be unexported (golint)
    • Line 14: warning: exported method SendEmail.Handle should have comment or be unexported (golint)
    • Line 38: warning: exported function GetConsumers should have comment or be unexported (golint)
    • gdk/pkg/cronx/example/basic/main.go
    • Line 13: warning: exported type SendEmail should have comment or be unexported (golint)
    • Line 15: warning: exported method SendEmail.Run should have comment or be unexported (golint)
    • Line 20: warning: exported type PayBill should have comment or be unexported (golint)
    • Line 22: warning: exported method PayBill.Run should have comment or be unexported (golint)
    • Line 27: warning: exported type AlwaysError should have comment or be unexported (golint)
    • Line 29: warning: exported method AlwaysError.Run should have comment or be unexported (golint)
    • Line 35: warning: exported type EveryJob should have comment or be unexported (golint)
    • Line 37: warning: exported method EveryJob.Run should have comment or be unexported (golint)
    • Line 42: warning: exported type Subscription should have comment or be unexported (golint)
    • Line 44: warning: exported method Subscription.Run should have comment or be unexported (golint)
    • Line 71: warning: exported function RegisterJobs should have comment or be unexported (golint)
    • gdk/pkg/filex/filex.go
    • Line 10: warning: exported function OpenFile should have comment or be unexported (golint)
    • Line 30: warning: exported function FileExists should have comment or be unexported (golint)
    • Line 35: warning: exported function FileEmpty should have comment or be unexported (golint)
    • Line 40: warning: exported function ReadFile should have comment or be unexported (golint)
    • gdk/pkg/queue/nsqx/consumer.go
    • Line 10: warning: exported type Consumer should have comment or be unexported (golint)
    • Line 20: warning: exported method Consumer.HandleMessage should have comment or be unexported (golint)
    • Line 30: warning: exported function NewConsumer should have comment or be unexported (golint)
    • Line 49: warning: exported method FuncConsumer.Handle should have comment or be unexported (golint)
    • gdk/pkg/logx/context.go
    • Line 21: warning: exported const CtxKeyRequestID should have comment (or a comment on this block) or be unexported (golint)
    • Line 71: warning: comment on exported function GetRequestID should be of the form "GetRequestID ..." (golint)
    • gdk/pkg/logx/zerolog.go
    • Line 14: warning: exported type ZeroLogger should have comment or be unexported (golint)
    • Line 18: warning: exported function NewZerolog should have comment or be unexported (golint)
    • Line 55: warning: exported method ZeroLogger.Trace should have comment or be unexported (golint)
    • Line 66: warning: exported method ZeroLogger.Debug should have comment or be unexported (golint)
    • Line 77: warning: exported method ZeroLogger.Info should have comment or be unexported (golint)
    • Line 88: warning: exported method ZeroLogger.Warn should have comment or be unexported (golint)
    • Line 114: warning: exported method ZeroLogger.Fatal should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!