Preparing report...

Report for github.com/9seconds/mtg

A+    Excellent!    Found 44 issues across 138 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!


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!


golint68%

Golint is a linter for Go source code.

    • mtg/internal/config/type_url.go
    • Line 9: warning: exported type TypeURL should have comment or be unexported (golint)
    • Line 13: warning: exported method TypeURL.UnmarshalText should have comment or be unexported (golint)
    • Line 53: warning: exported method TypeURL.MarshalText should have comment or be unexported (golint)
    • Line 65: warning: exported method TypeURL.Value should have comment or be unexported (golint)
    • mtg/internal/config/type_bytes.go
    • Line 10: warning: exported type TypeBytes should have comment or be unexported (golint)
    • Line 14: warning: exported method TypeBytes.UnmarshalText should have comment or be unexported (golint)
    • Line 36: warning: exported method TypeBytes.MarshalText should have comment or be unexported (golint)
    • Line 48: warning: exported method TypeBytes.Value should have comment or be unexported (golint)
    • mtg/internal/config/type_ip.go
    • Line 8: warning: exported type TypeIP should have comment or be unexported (golint)
    • Line 12: warning: exported method TypeIP.UnmarshalText should have comment or be unexported (golint)
    • Line 27: warning: exported method TypeIP.MarshalText should have comment or be unexported (golint)
    • Line 39: warning: exported method TypeIP.Value should have comment or be unexported (golint)
    • mtg/internal/config/type_prefer_ip.go
    • Line 26: warning: exported type TypePreferIP should have comment or be unexported (golint)
    • Line 30: warning: exported method TypePreferIP.UnmarshalText should have comment or be unexported (golint)
    • Line 47: warning: exported method TypePreferIP.MarshalText should have comment or be unexported (golint)
    • Line 55: warning: exported method TypePreferIP.Value should have comment or be unexported (golint)
    • mtg/mtglib/internal/faketls/client_hello.go
    • Line 14: warning: exported type ClientHello should have comment or be unexported (golint)
    • Line 22: warning: exported method ClientHello.Valid should have comment or be unexported (golint)
    • Line 42: warning: exported function ParseClientHello should have comment or be unexported (golint)
    • mtg/internal/cli/access.go
    • Line 35: warning: exported type Access should have comment or be unexported (golint)
    • Line 44: warning: exported method Access.Run should have comment or be unexported (golint)
    • Line 52: warning: exported method Access.Execute should have comment or be unexported (golint)
    • mtg/internal/config/type_duration.go
    • Line 9: warning: exported type TypeDuration should have comment or be unexported (golint)
    • Line 13: warning: exported method TypeDuration.UnmarshalText should have comment or be unexported (golint)
    • Line 32: warning: exported method TypeDuration.MarshalText should have comment or be unexported (golint)
    • Line 40: warning: exported method TypeDuration.Value should have comment or be unexported (golint)
    • mtg/internal/config/type_error_rate.go
    • Line 10: warning: exported type TypeErrorRate should have comment or be unexported (golint)
    • Line 14: warning: exported method TypeErrorRate.UnmarshalJSON should have comment or be unexported (golint)
    • Line 29: warning: exported method TypeErrorRate.MarshalText should have comment or be unexported (golint)
    • Line 37: warning: exported method TypeErrorRate.Value should have comment or be unexported (golint)
    • mtg/mtglib/internal/relay/relay.go
    • Line 10: warning: exported type Relay should have comment or be unexported (golint)
    • Line 22: warning: exported method Relay.Reset should have comment or be unexported (golint)
    • Line 35: warning: exported method Relay.Process should have comment or be unexported (golint)
    • mtg/internal/testlib/mtglib_network_mock.go
    • Line 11: warning: exported type MtglibNetworkMock should have comment or be unexported (golint)
    • Line 15: warning: exported method MtglibNetworkMock.Dial should have comment or be unexported (golint)
    • Line 21: warning: exported method MtglibNetworkMock.DialContext should have comment or be unexported (golint)
    • Line 27: warning: exported method MtglibNetworkMock.MakeHTTPClient should have comment or be unexported (golint)
    • mtg/mtglib/internal/telegram/telegram.go
    • Line 10: warning: exported type Telegram should have comment or be unexported (golint)
    • Line 16: warning: exported method Telegram.Dial should have comment or be unexported (golint)
    • Line 45: warning: exported function New should have comment or be unexported (golint)
    • mtg/internal/config/type_statsd_tag_format.go
    • Line 22: warning: exported type TypeStatsdTagFormat should have comment or be unexported (golint)
    • Line 26: warning: exported method TypeStatsdTagFormat.UnmarshalText should have comment or be unexported (golint)
    • Line 43: warning: exported method TypeStatsdTagFormat.MarshalText should have comment or be unexported (golint)
    • Line 51: warning: exported method TypeStatsdTagFormat.Value should have comment or be unexported (golint)
    • mtg/internal/cli/proxy.go
    • Line 18: warning: exported type Proxy should have comment or be unexported (golint)
    • Line 22: warning: exported method Proxy.Run should have comment or be unexported (golint)
    • Line 30: warning: exported method Proxy.Execute should have comment or be unexported (golint)
    • mtg/internal/config/type_hostport.go
    • Line 9: warning: exported type TypeHostPort should have comment or be unexported (golint)
    • Line 14: warning: exported method TypeHostPort.UnmarshalText should have comment or be unexported (golint)
    • Line 41: warning: exported method TypeHostPort.MarshalText should have comment or be unexported (golint)
    • Line 49: warning: exported method TypeHostPort.HostValue should have comment or be unexported (golint)
    • Line 53: warning: exported method TypeHostPort.PortValue should have comment or be unexported (golint)
    • Line 57: warning: exported method TypeHostPort.Value should have comment or be unexported (golint)
    • mtg/internal/config/type_http_path.go
    • Line 5: warning: exported type TypeHTTPPath should have comment or be unexported (golint)
    • Line 9: warning: exported method TypeHTTPPath.UnmarshalText should have comment or be unexported (golint)
    • Line 17: warning: exported method TypeHTTPPath.MarshalText should have comment or be unexported (golint)
    • Line 29: warning: exported method TypeHTTPPath.Value should have comment or be unexported (golint)
    • mtg/mtglib/internal/faketls/record/init.go
    • Line 5: warning: exported const TLSMaxRecordSize should have comment or be unexported (golint)
    • Line 7: warning: exported type Type should have comment or be unexported (golint)
    • Line 37: warning: exported method Type.Valid should have comment or be unexported (golint)
    • Line 46: warning: exported type Version should have comment or be unexported (golint)
    • Line 77: warning: exported method Version.Valid should have comment or be unexported (golint)
    • mtg/internal/testlib/net_conn_mock.go
    • Line 10: warning: exported type NetConnMock should have comment or be unexported (golint)
    • Line 26: warning: exported method NetConnMock.Close should have comment or be unexported (golint)
    • Line 30: warning: exported method NetConnMock.LocalAddr should have comment or be unexported (golint)
    • Line 34: warning: exported method NetConnMock.RemoteAddr should have comment or be unexported (golint)
    • Line 38: warning: exported method NetConnMock.SetDeadline should have comment or be unexported (golint)
    • Line 42: warning: exported method NetConnMock.SetReadDeadline should have comment or be unexported (golint)
    • Line 46: warning: exported method NetConnMock.SetWriteDeadline should have comment or be unexported (golint)
    • mtg/internal/config/config.go
    • Line 12: warning: exported type Config should have comment or be unexported (golint)
    • Line 59: warning: exported method Config.Validate should have comment or be unexported (golint)
    • Line 131: warning: exported function Parse should have comment or be unexported (golint)
    • mtg/internal/config/type_blocklist_uri.go
    • Line 10: warning: exported type TypeBlocklistURI should have comment or be unexported (golint)
    • Line 14: warning: exported method TypeBlocklistURI.UnmarshalText should have comment or be unexported (golint)
    • Line 50: warning: exported method TypeBlocklistURI.MarshalText should have comment or be unexported (golint)
    • Line 58: warning: exported method TypeBlocklistURI.IsRemote should have comment or be unexported (golint)
    • Line 62: warning: exported method TypeBlocklistURI.Value should have comment or be unexported (golint)
    • mtg/internal/config/type_port.go
    • Line 8: warning: exported type TypePort should have comment or be unexported (golint)
    • Line 12: warning: exported method TypePort.UnmarshalJSON should have comment or be unexported (golint)
    • Line 31: warning: exported method TypePort.MarshalJSON should have comment or be unexported (golint)
    • Line 39: warning: exported method TypePort.Value should have comment or be unexported (golint)
    • mtg/internal/config/type_metric_prefix.go
    • Line 8: warning: exported type TypeMetricPrefix should have comment or be unexported (golint)
    • Line 12: warning: exported method TypeMetricPrefix.UnmarshalText should have comment or be unexported (golint)
    • Line 27: warning: exported method TypeMetricPrefix.MarshalText should have comment or be unexported (golint)
    • Line 35: warning: exported method TypeMetricPrefix.Value should have comment or be unexported (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!