Preparing report...

Report for github.com/mqliang/libipvs

A    Great!    Found 6 issues across 8 files

Tweet

gofmt87%

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!


golint37%

Golint is a linter for Go source code.

    • libipvs/api.go
    • Line 11: warning: exported type AddressFamily should have comment or be unexported (golint)
    • Line 24: warning: exported type Protocol should have comment or be unexported (golint)
    • Line 39: warning: exported type Flags should have comment or be unexported (golint)
    • Line 81: warning: exported type Stats should have comment or be unexported (golint)
    • Line 96: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 128: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 149: warning: exported type FwdMethod should have comment or be unexported (golint)
    • Line 151: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 168: warning: exported function ParseFwdMethod should have comment or be unexported (golint)
    • Line 181: warning: exported type Version should have comment or be unexported (golint)
    • Line 191: warning: exported type Info should have comment or be unexported (golint)
    • libipvs/constants.go
    • Line 6: warning: exported const GENL_CTRL_ID should have comment (or a comment on this block) or be unexported (golint)
    • libipvs/ipvs.go
    • Line 15: warning: exported type IPVSHandle should have comment or be unexported (golint)
    • Line 28: warning: exported type IPVSHandleParams should have comment or be unexported (golint)
    • Line 44: warning: comment on exported function DefaultIPVSHandleParams should be of the form "DefaultIPVSHandleParams ..." (golint)
    • Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 86: warning: exported method Handle.Flush should have comment or be unexported (golint)
    • Line 90: warning: exported method Handle.ListServices should have comment or be unexported (golint)
    • Line 107: warning: exported method Handle.ListDestinations should have comment or be unexported (golint)
    • Line 125: warning: exported method Handle.GetInfo should have comment or be unexported (golint)
    • Line 131: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 192: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • libipvs/ipvs_nl_policy.go
    • Line 7: warning: don't use underscores in Go names; var ipvs_stats_policy should be ipvsStatsPolicy (golint)
    • Line 35: warning: don't use underscores in Go names; var ipvs_service_policy should be ipvsServicePolicy (golint)
    • Line 64: warning: don't use underscores in Go names; var ipvs_dest_policy should be ipvsDestPolicy (golint)
    • Line 94: warning: don't use underscores in Go names; var ipvs_daemon_policy should be ipvsDaemonPolicy (golint)
    • Line 108: warning: don't use underscores in Go names; var ipvs_cmd_policy should be ipvsCmdPolicy (golint)
    • Line 128: warning: don't use underscores in Go names; var ipvs_info_policy should be ipvsInfoPolicy (golint)
    • libipvs/utils.go
    • Line 127: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 177: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign87%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!