Preparing report...

Report for github.com/rumblefrog/go-a2s

A+    Excellent!    Found 11 issues across 14 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!


golint21%

Golint is a linter for Go source code.

    • go-a2s/challenge.go
    • Line 8: warning: exported const A2S_PLAYER_CHALLENGE_REPLY_HEADER should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported var ErrBadChallengeResponse should have comment or be unexported (golint)
    • go-a2s/client.go
    • Line 12: warning: exported const DefaultTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported var ErrNilOption should have comment or be unexported (golint)
    • Line 21: warning: exported type Client should have comment or be unexported (golint)
    • Line 33: warning: exported function TimeoutOption should have comment or be unexported (golint)
    • Line 41: warning: exported function PreOrangeBox should have comment or be unexported (golint)
    • Line 49: warning: exported function SetAppID should have comment or be unexported (golint)
    • Line 68: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 131: warning: exported method Client.Close should have comment or be unexported (golint)
    • go-a2s/info.go
    • Line 8: warning: exported const A2S_INFO_REQUEST should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported var ErrBadPacketHeader should have comment or be unexported (golint)
    • Line 17: warning: exported type ServerInfo should have comment or be unexported (golint)
    • Line 72: warning: exported type TheShipInfo should have comment or be unexported (golint)
    • Line 78: warning: exported type ExtendedServerInfo should have comment or be unexported (golint)
    • Line 92: warning: exported type SourceTVInfo should have comment or be unexported (golint)
    • Line 100: warning: exported method Client.QueryInfo should have comment or be unexported (golint)
    • go-a2s/player.go
    • Line 9: warning: exported const A2S_PLAYER_REQUEST should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported var ErrBadPlayerReply should have comment or be unexported (golint)
    • Line 17: warning: exported type PlayerInfo should have comment or be unexported (golint)
    • Line 25: warning: exported type Player should have comment or be unexported (golint)
    • Line 45: warning: exported type TheShipPlayer should have comment or be unexported (golint)
    • Line 53: warning: exported method Client.QueryPlayer should have comment or be unexported (golint)
    • go-a2s/rules.go
    • Line 9: warning: exported const A2S_RULES_REQUEST should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported var ErrBadRulesReply should have comment or be unexported (golint)
    • Line 17: warning: exported type RulesInfo should have comment or be unexported (golint)
    • Line 25: warning: exported type Rule should have comment or be unexported (golint)
    • Line 30: warning: exported method Client.QueryRules should have comment or be unexported (golint)
    • go-a2s/server_os.go
    • Line 3: warning: exported type ServerOS should have comment or be unexported (golint)
    • Line 6: warning: don't use underscores in Go names; const ServerOS_Unknown should be ServerOSUnknown (golint)
    • Line 6: warning: exported const ServerOS_Unknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 7: warning: don't use underscores in Go names; const ServerOS_Linux should be ServerOSLinux (golint)
    • Line 8: warning: don't use underscores in Go names; const ServerOS_Windows should be ServerOSWindows (golint)
    • Line 9: warning: don't use underscores in Go names; const ServerOS_Mac should be ServerOSMac (golint)
    • Line 12: warning: exported function ParseServerOS should have comment or be unexported (golint)
    • go-a2s/server_type.go
    • Line 3: warning: exported type ServerType should have comment or be unexported (golint)
    • Line 6: warning: don't use underscores in Go names; const ServerType_Unknown should be ServerTypeUnknown (golint)
    • Line 6: warning: exported const ServerType_Unknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 7: warning: don't use underscores in Go names; const ServerType_Dedicated should be ServerTypeDedicated (golint)
    • Line 8: warning: don't use underscores in Go names; const ServerType_NonDedicated should be ServerTypeNonDedicated (golint)
    • Line 9: warning: don't use underscores in Go names; const ServerType_SourceTV should be ServerTypeSourceTV (golint)
    • Line 12: warning: exported function ParseServerType should have comment or be unexported (golint)
    • go-a2s/appids.go
    • Line 3: warning: exported type AppID should have comment or be unexported (golint)
    • Line 6: warning: don't use underscores in Go names; const App_TheShip should be AppTheShip (golint)
    • Line 6: warning: exported const App_TheShip should have comment (or a comment on this block) or be unexported (golint)
    • go-a2s/packet.go
    • Line 12: warning: exported var ErrOutOfBounds should have comment or be unexported (golint)
    • Line 15: warning: exported type PacketBuilder should have comment or be unexported (golint)
    • Line 19: warning: exported method PacketBuilder.WriteCString should have comment or be unexported (golint)
    • Line 24: warning: exported method PacketBuilder.WriteBytes should have comment or be unexported (golint)
    • Line 28: warning: exported type PacketReader should have comment or be unexported (golint)
    • Line 33: warning: exported function NewPacketReader should have comment or be unexported (golint)
    • Line 40: warning: exported method PacketReader.CanRead should have comment or be unexported (golint)
    • Line 48: warning: exported method PacketReader.Pos should have comment or be unexported (golint)
    • Line 52: warning: exported method PacketReader.ReadIPv4 should have comment or be unexported (golint)
    • Line 64: warning: exported method PacketReader.ReadPort should have comment or be unexported (golint)
    • Line 76: warning: exported method PacketReader.ReadUint8 should have comment or be unexported (golint)
    • Line 82: warning: exported method PacketReader.ReadUint16 should have comment or be unexported (golint)
    • Line 88: warning: exported method PacketReader.ReadUint32 should have comment or be unexported (golint)
    • Line 94: warning: exported method PacketReader.ReadInt32 should have comment or be unexported (golint)
    • Line 98: warning: exported method PacketReader.ReadUint64 should have comment or be unexported (golint)
    • Line 104: warning: exported method PacketReader.ReadFloat32 should have comment or be unexported (golint)
    • Line 110: warning: exported method PacketReader.TryReadString should have comment or be unexported (golint)
    • Line 122: warning: exported method PacketReader.ReadString should have comment or be unexported (golint)
    • Line 134: warning: exported method PacketReader.More should have comment or be unexported (golint)
    • go-a2s/the_ship.go
    • Line 3: warning: exported type TheShipMode should have comment or be unexported (golint)
    • Line 15: warning: don't use underscores in Go names; const TheShipMode_Unknown should be TheShipModeUnknown (golint)
    • Line 15: warning: exported const TheShipMode_Unknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: don't use underscores in Go names; const TheShipMode_Hunt should be TheShipModeHunt (golint)
    • Line 17: warning: don't use underscores in Go names; const TheShipMode_Elimination should be TheShipModeElimination (golint)
    • Line 18: warning: don't use underscores in Go names; const TheShipMode_Duel should be TheShipModeDuel (golint)
    • Line 19: warning: don't use underscores in Go names; const TheShipMode_Deathmatch should be TheShipModeDeathmatch (golint)
    • Line 20: warning: don't use underscores in Go names; const TheShipMode_VIP_Team should be TheShipModeVIPTeam (golint)
    • Line 21: warning: don't use underscores in Go names; const TheShipMode_Team_Elimination should be TheShipModeTeamElimination (golint)
    • Line 24: warning: exported function ParseTheShipMode should have comment or be unexported (golint)
    • go-a2s/multi.go
    • Line 11: warning: exported const MULTI_PACKET_RESPONSE_HEADER should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported var ErrPacketOutOfBound should have comment or be unexported (golint)
    • Line 21: warning: exported type MultiPacketHeader 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!