Preparing report...

Report for github.com/ICKelin/opennotr

A+    Excellent!    Found 19 issues across 58 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!


golint68%

Golint is a linter for Go source code.

    • opennotr/opennotrd/plugin/plugin.go
    • Line 64: warning: exported type PluginManager should have comment or be unexported (golint)
    • Line 79: warning: exported function DefaultPluginManager should have comment or be unexported (golint)
    • Line 83: warning: exported function Register should have comment or be unexported (golint)
    • Line 87: warning: exported function Setup should have comment or be unexported (golint)
    • Line 106: warning: exported method PluginManager.AddProxy should have comment or be unexported (golint)
    • Line 128: warning: exported method PluginManager.DelProxy should have comment or be unexported (golint)
    • opennotr/opennotrd/core/config.go
    • Line 10: warning: exported type Config should have comment or be unexported (golint)
    • Line 19: warning: exported type ServerConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type TCPForwardConfig should have comment or be unexported (golint)
    • Line 31: warning: exported type UDPForwardConfig should have comment or be unexported (golint)
    • Line 38: warning: exported type DHCPConfig should have comment or be unexported (golint)
    • Line 43: warning: exported type ResolverConfig should have comment or be unexported (golint)
    • Line 47: warning: exported function ParseConfig should have comment or be unexported (golint)
    • opennotr/opennotrd/core/dhcp.go
    • Line 9: warning: exported type DHCP should have comment or be unexported (golint)
    • Line 17: warning: exported function NewDHCP should have comment or be unexported (golint)
    • Line 37: warning: exported method DHCP.GetCIDR should have comment or be unexported (golint)
    • Line 41: warning: exported method DHCP.SelectIP should have comment or be unexported (golint)
    • Line 54: warning: exported method DHCP.ReleaseIP should have comment or be unexported (golint)
    • opennotr/opennotrd/core/resolver.go
    • Line 17: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 22: warning: exported function NewResolve should have comment or be unexported (golint)
    • Line 37: warning: exported method Resolver.ApplyDomain should have comment or be unexported (golint)
    • opennotr/opennotrd/core/server.go
    • Line 17: warning: exported type Server should have comment or be unexported (golint)
    • Line 37: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 53: warning: exported method Server.ListenAndServe should have comment or be unexported (golint)
    • opennotr/opennotrd/plugin/dummy/dummy.go
    • Line 14: warning: exported type DummyPlugin should have comment or be unexported (golint)
    • Line 16: warning: exported method DummyPlugin.Setup should have comment or be unexported (golint)
    • Line 20: warning: exported method DummyPlugin.RunProxy should have comment or be unexported (golint)
    • Line 25: warning: exported method DummyPlugin.StopProxy should have comment or be unexported (golint)
    • opennotr/opennotrd/plugin/udpproxy/udpproxy.go
    • Line 26: warning: exported type UDPProxy should have comment or be unexported (golint)
    • Line 30: warning: exported method UDPProxy.Setup should have comment or be unexported (golint)
    • Line 44: warning: exported method UDPProxy.StopProxy should have comment or be unexported (golint)
    • Line 51: warning: exported method UDPProxy.RunProxy should have comment or be unexported (golint)
    • opennotr/opennotrd/plugin/tcpproxy/tcpproxy.go
    • Line 18: warning: exported type TCPProxy should have comment or be unexported (golint)
    • Line 20: warning: exported method TCPProxy.Setup should have comment or be unexported (golint)
    • Line 22: warning: exported method TCPProxy.StopProxy should have comment or be unexported (golint)
    • Line 29: warning: exported method TCPProxy.RunProxy should have comment or be unexported (golint)
    • opennotr/pkg/proto/cs.go
    • Line 11: warning: exported const CmdAuth should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type S2CHeartbeat should have comment or be unexported (golint)
    • Line 19: warning: exported type C2SHeartbeat should have comment or be unexported (golint)
    • Line 21: warning: exported type C2SAuth should have comment or be unexported (golint)
    • Line 27: warning: exported type ForwardItem should have comment or be unexported (golint)
    • Line 45: warning: exported type S2CAuth should have comment or be unexported (golint)
    • Line 50: warning: exported type ProxyProtocol should have comment or be unexported (golint)
    • Line 58: warning: comment on exported type Header should be of the form "Header ..." (with optional leading article) (golint)
    • Line 63: warning: exported method Header.Version should have comment or be unexported (golint)
    • Line 67: warning: exported method Header.Cmd should have comment or be unexported (golint)
    • Line 71: warning: exported method Header.Bodylen should have comment or be unexported (golint)
    • Line 75: warning: exported function Read should have comment or be unexported (golint)
    • Line 96: warning: exported function Write should have comment or be unexported (golint)
    • Line 110: warning: exported function WriteJSON should have comment or be unexported (golint)
    • Line 118: warning: exported function ReadJSON should have comment or be unexported (golint)
    • opennotr/opennotr/client.go
    • Line 17: warning: exported type Client should have comment or be unexported (golint)
    • Line 26: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 45: warning: exported method Client.Run should have comment or be unexported (golint)
    • opennotr/opennotr/config.go
    • Line 11: warning: exported type Config should have comment or be unexported (golint)
    • Line 18: warning: exported function ParseConfig should have comment or be unexported (golint)
    • opennotr/pkg/logs/log.go
    • Line 555: warning: exported function Level should have comment or be unexported (golint)
    • Line 563: warning: exported function Init should have comment or be unexported (golint)
    • opennotr/opennotrd/plugin/restyproxy/restyproxy.go
    • Line 24: warning: exported type AddUpstreamBody should have comment or be unexported (golint)
    • Line 31: warning: exported type RestyConfig should have comment or be unexported (golint)
    • Line 35: warning: exported type RestyProxy should have comment or be unexported (golint)
    • Line 39: warning: exported method RestyProxy.Setup should have comment or be unexported (golint)
    • Line 49: warning: exported method RestyProxy.StopProxy should have comment or be unexported (golint)
    • Line 53: warning: exported method RestyProxy.RunProxy should have comment or be unexported (golint)
    • opennotr/opennotrd/core/tcpforward.go
    • Line 18: warning: exported type TCPForward should have comment or be unexported (golint)
    • Line 33: warning: exported function NewTCPForward should have comment or be unexported (golint)
    • Line 51: warning: exported method TCPForward.Listen should have comment or be unexported (golint)
    • Line 72: warning: exported method TCPForward.Serve should have comment or be unexported (golint)
    • opennotr/opennotrd/core/session.go
    • Line 34: warning: exported method SessionManager.AddSession should have comment or be unexported (golint)
    • Line 38: warning: exported method SessionManager.GetSession should have comment or be unexported (golint)
    • Line 46: warning: exported method SessionManager.DeleteSession should have comment or be unexported (golint)
    • opennotr/opennotrd/core/udpforward.go
    • Line 31: warning: exported type UDPForward should have comment or be unexported (golint)
    • Line 48: warning: exported function NewUDPForward should have comment or be unexported (golint)
    • Line 126: warning: exported method UDPForward.Serve should have comment or be unexported (golint)

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.


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


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!