Preparing report...

Report for github.com/emmaunel/DiscordGo

(v0.0.0-20211203093059-58d53bebdca7)

B    Not bad!    Found 9 issues across 9 files

Tweet

gofmt66%

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!


gocyclo66%

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.


golint33%

Golint is a linter for Go source code.

    • pkg/agents/agents.go
    • Line 9: warning: exported var Agents should have comment or be unexported (golint)
    • Line 11: warning: exported function AddNewAgent should have comment or be unexported (golint)
    • Line 27: warning: exported function RemoveAgent should have comment or be unexported (golint)
    • Line 39: warning: exported function DoesAgentExist should have comment or be unexported (golint)
    • Line 49: warning: exported function UseAgent should have comment or be unexported (golint)
    • pkg/agent/agent.go
    • Line 3: warning: comment on exported type Agent should be of the form "Agent ..." (with optional leading article) (golint)
    • Line 19: warning: exported type File should have comment or be unexported (golint)
    • Line 38: warning: exported type FileListData should have comment or be unexported (golint)
    • Line 42: warning: exported type FileList should have comment or be unexported (golint)
    • Line 48: warning: exported type Credentials should have comment or be unexported (golint)
    • pkg/message/message.go
    • Line 12: warning: exported type Type should have comment or be unexported (golint)
    • Line 15: warning: exported const MESSAGE_PING should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type Message should have comment or be unexported (golint)
    • Line 49: warning: exported function CommandMessage should have comment or be unexported (golint)
    • Line 65: warning: exported function Pong should have comment or be unexported (golint)
    • Line 70: warning: exported function KillAgent should have comment or be unexported (golint)
    • Line 75: warning: exported function SendShell should have comment or be unexported (golint)
    • pkg/util/db.go
    • Line 13: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 16: warning: exported var DB should have comment or be unexported (golint)
    • Line 20: warning: exported function CreateDatabaseAndTable should have comment or be unexported (golint)
    • Line 57: warning: exported function InsertAgentToDB should have comment or be unexported (golint)
    • Line 87: warning: exported function LoadFromDB should have comment or be unexported (golint)
    • Line 99: warning: exported function UpdateAgentTimestamp should have comment or be unexported (golint)
    • Line 111: warning: exported function UpdateAgentStatus should have comment or be unexported (golint)
    • Line 122: warning: exported function DropDB should have comment or be unexported (golint)
    • Line 133: warning: exported function RemoveAgentFromDB should have comment or be unexported (golint)
    • Line 139: warning: exported function AgentsByHostname should have comment or be unexported (golint)
    • pkg/cli/cli.go
    • Line 23: warning: exported var Prompt should have comment or be unexported (golint)
    • Line 40: warning: exported function MainCompleter should have comment or be unexported (golint)
    • Line 64: warning: exported function AgentCompleter should have comment or be unexported (golint)
    • Line 322: warning: exported type PwnBoard should have comment or be unexported (golint)
    • cmd/organizer/main.go
    • Line 24: warning: exported type Target should have comment or be unexported (golint)
    • Line 91: warning: don't use underscores in Go names; var group_id should be groupID (golint)
    • Line 168: warning: don't use underscores in Go names; var agent_ip_address should be agentIPAddress (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell77%

Misspell Finds commonly misspelled English words