Preparing report...

Report for github.com/btwiuse/k0s

A+    Excellent!    Found 140 issues across 247 files

Tweet

gofmt92%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

    • k0s/cmd/kproxy/cmd.go
    • Line 50: expected operand, found ',':1::warning: file is not gofmted with -s (gofmt)
    • Line 51: missing ',' in argument list:1::warning: file is not gofmted with -s (gofmt)
    • Line 52: missing ',' before newline in composite literal:1::warning: file is not gofmted with -s (gofmt)
    • Line 53: missing ',' before newline in argument list:1::warning: file is not gofmted with -s (gofmt)
    • Line 55: missing ',' in argument list:1::warning: file is not gofmted with -s (gofmt)
    • Line 56: expected operand, found 'if':1::warning: file is not gofmted with -s (gofmt)
    • Line 57: missing ',' before newline in composite literal:1::warning: file is not gofmted with -s (gofmt)
    • Line 58: missing ',' before newline in argument list:1::warning: file is not gofmted with -s (gofmt)
    • Line 60: missing ',' before newline in argument list:1::warning: file is not gofmted with -s (gofmt)
    • Line 61: expected '==', found '=':1::warning: file is not gofmted with -s (gofmt)
    • Line 62: expected operand, found 'if':1::warning: file is not gofmted with -s (gofmt)

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!


gocyclo91%

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.

    • k0s/bin.go
    • Line 202: warning: cyclomatic complexity 20 of function main() is high (> 15) (gocyclo)
    • Line 77: warning: cyclomatic complexity 20 of function (Combo).Env() is high (> 15) (gocyclo)
    • k0s/pkg/fzf/tui/light.go
    • Line 378: warning: cyclomatic complexity 72 of function (*LightRenderer).escSequence() is high (> 15) (gocyclo)
    • Line 324: warning: cyclomatic complexity 16 of function (*LightRenderer).GetChar() is high (> 15) (gocyclo)
    • k0s/pkg/fzf/options.go
    • Line 1025: warning: cyclomatic complexity 137 of function parseOptions() is high (> 15) (gocyclo)
    • Line 663: warning: cyclomatic complexity 76 of function parseKeymap() is high (> 15) (gocyclo)
    • Line 400: warning: cyclomatic complexity 66 of function parseKeyChords() is high (> 15) (gocyclo)
    • Line 563: warning: cyclomatic complexity 30 of function parseTheme() is high (> 15) (gocyclo)
    • Line 951: warning: cyclomatic complexity 17 of function parsePreviewWindow() is high (> 15) (gocyclo)
    • k0s/pkg/fzf/tokenizer.go
    • Line 181: warning: cyclomatic complexity 21 of function Transform() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 16 of function ParseRange() is high (> 15) (gocyclo)
    • k0s/pkg/cli/gost/route.go
    • Line 309: warning: cyclomatic complexity 83 of function (*route).GenRouters() is high (> 15) (gocyclo)
    • Line 89: warning: cyclomatic complexity 57 of function parseChainNode() is high (> 15) (gocyclo)
    • k0s/pkg/fzf/terminal.go
    • Line 1495: warning: cyclomatic complexity 215 of function (*Terminal).Loop() is high (> 15) (gocyclo)
    • Line 572: warning: cyclomatic complexity 25 of function (*Terminal).resizeWindows() is high (> 15) (gocyclo)
    • Line 1288: warning: cyclomatic complexity 23 of function replacePlaceholder() is high (> 15) (gocyclo)
    • Line 1047: warning: cyclomatic complexity 20 of function (*Terminal).printPreview() is high (> 15) (gocyclo)
    • Line 322: warning: cyclomatic complexity 19 of function NewTerminal() is high (> 15) (gocyclo)
    • Line 952: warning: cyclomatic complexity 16 of function (*Terminal).printHighlighted() is high (> 15) (gocyclo)
    • Line 748: warning: cyclomatic complexity 16 of function (*Terminal).printInfo() is high (> 15) (gocyclo)
    • k0s/pkg/fzf/algo/algo.go
    • Line 341: warning: cyclomatic complexity 51 of function FuzzyMatchV2() is high (> 15) (gocyclo)
    • Line 615: warning: cyclomatic complexity 22 of function FuzzyMatchV1() is high (> 15) (gocyclo)
    • Line 701: warning: cyclomatic complexity 17 of function ExactMatchNaive() is high (> 15) (gocyclo)
    • k0s/pkg/fzf/pattern.go
    • Line 164: warning: cyclomatic complexity 21 of function parseTerms() is high (> 15) (gocyclo)
    • Line 86: warning: cyclomatic complexity 20 of function BuildPattern() is high (> 15) (gocyclo)

golint51%

Golint is a linter for Go source code.

    • k0s/pkg/jsondns/response.go
    • Line 31: warning: exported type QuestionList should have comment or be unexported (golint)
    • Line 33: warning: exported method QuestionList.UnmarshalJSON should have comment or be unexported (golint)
    • Line 50: warning: exported type Response should have comment or be unexported (golint)
    • Line 76: warning: exported type Question should have comment or be unexported (golint)
    • Line 83: warning: exported type RR should have comment or be unexported (golint)
    • k0s/pkg/fzf/util/slab.go
    • Line 3: warning: exported type Slab should have comment or be unexported (golint)
    • Line 8: warning: exported function MakeSlab should have comment or be unexported (golint)
    • k0s/pkg/asciitransport/v2/opts.go
    • Line 5: warning: exported type Opt should have comment or be unexported (golint)
    • Line 7: warning: exported function WithReader should have comment or be unexported (golint)
    • Line 13: warning: exported function WithWriter should have comment or be unexported (golint)
    • Line 19: warning: exported function WithResizeHook should have comment or be unexported (golint)
    • Line 25: warning: exported function WithLogger should have comment or be unexported (golint)
    • k0s/pkg/dohserver/server.go
    • Line 41: warning: exported type Server should have comment or be unexported (golint)
    • Line 49: warning: exported type DNSRequest should have comment or be unexported (golint)
    • Line 59: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 82: warning: exported method Server.Handler should have comment or be unexported (golint)
    • k0s/pkg/fzf/options.go
    • Line 1380: warning: exported type Opt should have comment or be unexported (golint)
    • Line 1382: warning: exported function WithReader should have comment or be unexported (golint)
    • Line 1388: warning: exported function WithWriter should have comment or be unexported (golint)
    • k0s/pkg/agent/agent/rpc.go
    • Line 17: warning: exported function NewRPC should have comment or be unexported (golint)
    • Line 62: warning: exported type YS should have comment or be unexported (golint)
    • Line 70: warning: exported method YS.Actions should have comment or be unexported (golint)
    • Line 70: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • Line 74: warning: exported method YS.Close should have comment or be unexported (golint)
    • Line 74: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • Line 78: warning: exported method YS.Done should have comment or be unexported (golint)
    • Line 78: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • k0s/pkg/gitd/server_utils.go
    • Line 16: warning: exported function GetParamValues should have comment or be unexported (golint)
    • Line 24: warning: exported function FindService should have comment or be unexported (golint)
    • Line 30: warning: exported function SetHeader should have comment or be unexported (golint)
    • Line 38: warning: exported function CreateFirstPKTLine should have comment or be unexported (golint)
    • Line 49: warning: exported function GetDefaultReposPath should have comment or be unexported (golint)
    • Line 54: warning: exported function IsExistingRepository should have comment or be unexported (golint)
    • Line 62: warning: exported function FormatRepoName should have comment or be unexported (golint)
    • Line 72: warning: exported function GetDefaultGitPath should have comment or be unexported (golint)
    • Line 76: warning: exported function GetChildPipes should have comment or be unexported (golint)
    • k0s/pkg/default.go
    • Line 4: warning: exported const DEFAULT_HUB_ADDRESS should have comment (or a comment on this block) or be unexported (golint)
    • k0s/pkg/asciitransport/event.go
    • Line 11: warning: exported type ResizeEvent should have comment or be unexported (golint)
    • Line 12: warning: exported type OutputEvent should have comment or be unexported (golint)
    • Line 13: warning: exported type PingEvent should have comment or be unexported (golint)
    • Line 14: warning: exported type InputEvent should have comment or be unexported (golint)
    • Line 15: warning: exported type Event should have comment or be unexported (golint)
    • Line 17: warning: exported method Event.UnmarshalJSON should have comment or be unexported (golint)
    • k0s/pkg/asciitransport/core.go
    • Line 13: warning: exported type Opt should have comment or be unexported (golint)
    • Line 15: warning: exported type AsciiTransport should have comment or be unexported (golint)
    • Line 30: warning: exported type Resizer should have comment or be unexported (golint)
    • Line 34: warning: exported method AsciiTransport.OutputEvent should have comment or be unexported (golint)
    • Line 35: warning: exported method AsciiTransport.InputEvent should have comment or be unexported (golint)
    • Line 35: warning: receiver name s should be consistent with previous receiver name c for AsciiTransport (golint)
    • Line 36: warning: exported method AsciiTransport.ResizeEvent should have comment or be unexported (golint)
    • Line 36: warning: receiver name s should be consistent with previous receiver name c for AsciiTransport (golint)
    • Line 38: warning: exported method AsciiTransport.Close should have comment or be unexported (golint)
    • Line 49: warning: exported method AsciiTransport.Done should have comment or be unexported (golint)
    • Line 53: warning: exported method AsciiTransport.Input should have comment or be unexported (golint)
    • Line 68: warning: exported method AsciiTransport.InputFrom should have comment or be unexported (golint)
    • Line 80: warning: exported method AsciiTransport.OutputFrom should have comment or be unexported (golint)
    • Line 92: warning: exported method AsciiTransport.Output should have comment or be unexported (golint)
    • Line 102: warning: exported method AsciiTransport.Resize should have comment or be unexported (golint)
    • k0s/pkg/agent/types.go
    • Line 11: warning: exported type Info should have comment or be unexported (golint)
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 44: warning: exported type Dialer should have comment or be unexported (golint)
    • Line 51: warning: exported type RPC should have comment or be unexported (golint)
    • Line 61: warning: comment on exported type Agent should be of the form "Agent ..." (with optional leading article) (golint)
    • Line 80: warning: exported type TunnelListener should have comment or be unexported (golint)
    • Line 84: warning: exported type TtyFactory should have comment or be unexported (golint)
    • Line 88: warning: exported type Tty should have comment or be unexported (golint)
    • k0s/pkg/client/config/config.go
    • Line 125: warning: exported type Opt should have comment or be unexported (golint)
    • Line 127: warning: exported function SetCacheCredentials should have comment or be unexported (golint)
    • Line 133: warning: exported function SetHub should have comment or be unexported (golint)
    • Line 139: warning: exported function SetRedir should have comment or be unexported (golint)
    • Line 145: warning: exported function SetSocks should have comment or be unexported (golint)
    • Line 151: warning: exported function SetDoh should have comment or be unexported (golint)
    • Line 157: warning: exported function SetRecord should have comment or be unexported (golint)
    • Line 163: warning: exported function SetInsecure should have comment or be unexported (golint)
    • Line 169: warning: exported function SetURI should have comment or be unexported (golint)
    • Line 189: warning: exported function SetVerbose should have comment or be unexported (golint)
    • Line 248: warning: exported function Parse should have comment or be unexported (golint)
    • k0s/pkg/fzf/tui/tui.go
    • Line 103: warning: exported const AltA should have comment (or a comment on this block) or be unexported (golint)
    • Line 118: warning: exported type Color should have comment or be unexported (golint)
    • Line 140: warning: exported type FillReturn should have comment or be unexported (golint)
    • Line 143: warning: exported const FillContinue should have comment (or a comment on this block) or be unexported (golint)
    • Line 148: warning: exported type ColorPair should have comment or be unexported (golint)
    • Line 154: warning: exported function HexToColor should have comment or be unexported (golint)
    • Line 161: warning: exported function NewColorPair should have comment or be unexported (golint)
    • Line 165: warning: exported method ColorPair.Fg should have comment or be unexported (golint)
    • Line 169: warning: exported method ColorPair.Bg should have comment or be unexported (golint)
    • Line 173: warning: exported type ColorTheme should have comment or be unexported (golint)
    • Line 192: warning: exported type Event should have comment or be unexported (golint)
    • Line 198: warning: exported type MouseEvent should have comment or be unexported (golint)
    • Line 208: warning: exported type BorderShape should have comment or be unexported (golint)
    • Line 211: warning: exported const BorderNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 216: warning: exported type BorderStyle should have comment or be unexported (golint)
    • Line 226: warning: exported type BorderCharacter should have comment or be unexported (golint)
    • Line 228: warning: exported function MakeBorderStyle should have comment or be unexported (golint)
    • Line 251: warning: exported function MakeTransparentBorder should have comment or be unexported (golint)
    • Line 262: warning: exported type Renderer should have comment or be unexported (golint)
    • Line 280: warning: exported type Window should have comment or be unexported (golint)
    • Line 303: warning: exported type FullscreenRenderer should have comment or be unexported (golint)
    • Line 311: warning: exported function NewFullscreenRenderer should have comment or be unexported (golint)
    • Line 322: warning: exported var Default16 should have comment or be unexported (golint)
    • Line 343: warning: exported function EmptyTheme should have comment or be unexported (golint)
    • k0s/pkg/asciitransport/v2/utils.go
    • Line 5: warning: exported function O should have comment or be unexported (golint)
    • Line 9: warning: exported function I should have comment or be unexported (golint)
    • Line 13: warning: exported function R should have comment or be unexported (golint)
    • Line 17: warning: exported function Uw should have comment or be unexported (golint)
    • Line 21: warning: exported function Uh should have comment or be unexported (golint)
    • k0s/pkg/hub/hub/rpc.go
    • Line 23: warning: exported function ToRPC should have comment or be unexported (golint)
    • Line 94: warning: exported method YS.Actions should have comment or be unexported (golint)
    • Line 94: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • Line 98: warning: exported method YS.Close should have comment or be unexported (golint)
    • Line 98: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • Line 104: warning: exported method YS.Done should have comment or be unexported (golint)
    • Line 104: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • Line 108: warning: exported method YS.Time should have comment or be unexported (golint)
    • Line 108: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • Line 112: warning: exported method YS.Name should have comment or be unexported (golint)
    • Line 112: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • Line 116: warning: exported method YS.ID should have comment or be unexported (golint)
    • Line 116: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • Line 120: warning: exported method YS.RemoteIP should have comment or be unexported (golint)
    • Line 120: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • Line 121: warning: don't use underscores in Go names; var remote_hostport should be remoteHostport (golint)
    • Line 129: warning: exported type YS should have comment or be unexported (golint)
    • Line 140: warning: exported method YS.NewTunnel should have comment or be unexported (golint)
    • Line 140: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • Line 148: warning: exported method YS.Ping should have comment or be unexported (golint)
    • Line 148: warning: receiver name ys should be consistent with previous receiver name rpc for YS (golint)
    • k0s/pkg/utils/netconn_gorilla.go
    • Line 19: warning: exported function NetConn should have comment or be unexported (golint)
    • Line 74: warning: receiver name c should be consistent with previous receiver name wsw for netConn (golint)
    • k0s/pkg/agent/config/config.go
    • Line 43: warning: exported type Config should have comment or be unexported (golint)
    • Line 63: warning: exported method Config.GetVersion should have comment or be unexported (golint)
    • Line 67: warning: exported method Config.GetVerbose should have comment or be unexported (golint)
    • Line 71: warning: exported method Config.GetReadOnly should have comment or be unexported (golint)
    • Line 75: warning: exported method Config.GetInsecure should have comment or be unexported (golint)
    • Line 79: warning: exported method Config.GetPet should have comment or be unexported (golint)
    • Line 83: warning: exported method Config.GetCmd should have comment or be unexported (golint)
    • Line 87: warning: exported method Config.GetID should have comment or be unexported (golint)
    • Line 91: warning: exported method Config.GetName should have comment or be unexported (golint)
    • Line 95: warning: exported method Config.GetTags should have comment or be unexported (golint)
    • Line 99: warning: exported method Config.GetPort should have comment or be unexported (golint)
    • Line 114: warning: exported method Config.GetAddr should have comment or be unexported (golint)
    • Line 131: warning: exported method Config.GetSchemeWS should have comment or be unexported (golint)
    • Line 140: warning: exported method Config.GetScheme should have comment or be unexported (golint)
    • Line 150: warning: exported type Opt should have comment or be unexported (golint)
    • Line 152: warning: exported function SetHub should have comment or be unexported (golint)
    • Line 158: warning: exported function SetCmd should have comment or be unexported (golint)
    • Line 164: warning: exported function SetPet should have comment or be unexported (golint)
    • Line 170: warning: exported function SetInsecure should have comment or be unexported (golint)
    • Line 176: warning: exported function SetURI should have comment or be unexported (golint)
    • Line 192: warning: exported function SetReadOnly should have comment or be unexported (golint)
    • Line 198: warning: exported function SetVerbose should have comment or be unexported (golint)
    • Line 204: warning: exported function SetID should have comment or be unexported (golint)
    • Line 210: warning: exported function SetName should have comment or be unexported (golint)
    • Line 216: warning: exported function SetTags should have comment or be unexported (golint)
    • Line 222: warning: exported function SetInfo should have comment or be unexported (golint)
    • Line 228: warning: exported method Config.GetHost should have comment or be unexported (golint)
    • Line 284: warning: exported function Parse should have comment or be unexported (golint)
    • Line 447: warning: exported function Decode should have comment or be unexported (golint)
    • k0s/pkg/uuid/id.go
    • Line 7: warning: exported function New should have comment or be unexported (golint)
    • Line 12: warning: exported function NewPet should have comment or be unexported (golint)
    • k0s/pkg/tunnel/tunnel.go
    • Line 13: warning: exported function NewTunnel should have comment or be unexported (golint)
    • Line 21: warning: exported type Tunnel should have comment or be unexported (golint)
    • Line 29: warning: exported method Tunnel.Accept should have comment or be unexported (golint)
    • Line 38: warning: exported method Tunnel.Close should have comment or be unexported (golint)
    • Line 47: warning: exported method Tunnel.Addr should have comment or be unexported (golint)
    • Line 51: warning: exported method Tunnel.Network should have comment or be unexported (golint)
    • Line 70: warning: exported method Tunnel.Push should have comment or be unexported (golint)
    • k0s/pkg/wrap/connaddr.go
    • Line 7: warning: comment on exported function ConnWithAddr should be of the form "ConnWithAddr ..." (golint)
    • Line 21: warning: exported function NewAddr should have comment or be unexported (golint)
    • k0s/pkg/fzf/tui/dummy.go
    • Line 7: warning: exported type Attr should have comment or be unexported (golint)
    • Line 9: warning: exported function HasFullscreenRenderer should have comment or be unexported (golint)
    • Line 13: warning: exported method Attr.Merge should have comment or be unexported (golint)
    • Line 18: warning: exported const AttrRegular should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported method FullscreenRenderer.Init should have comment or be unexported (golint)
    • Line 29: warning: exported method FullscreenRenderer.Pause should have comment or be unexported (golint)
    • Line 30: warning: exported method FullscreenRenderer.Resume should have comment or be unexported (golint)
    • Line 31: warning: exported method FullscreenRenderer.Clear should have comment or be unexported (golint)
    • Line 32: warning: exported method FullscreenRenderer.Refresh should have comment or be unexported (golint)
    • Line 33: warning: exported method FullscreenRenderer.Close should have comment or be unexported (golint)
    • Line 35: warning: exported method FullscreenRenderer.DoesAutoWrap should have comment or be unexported (golint)
    • Line 36: warning: exported method FullscreenRenderer.GetChar should have comment or be unexported (golint)
    • Line 37: warning: exported method FullscreenRenderer.MaxX should have comment or be unexported (golint)
    • Line 38: warning: exported method FullscreenRenderer.MaxY should have comment or be unexported (golint)
    • Line 40: warning: exported method FullscreenRenderer.RefreshWindows should have comment or be unexported (golint)
    • Line 42: warning: exported method FullscreenRenderer.NewWindow should have comment or be unexported (golint)
    • k0s/pkg/cli/buildkite/main.go
    • Line 12: warning: exported var AppHelpTemplate should have comment or be unexported (golint)
    • Line 24: warning: exported var SubcommandHelpTemplate should have comment or be unexported (golint)
    • Line 38: warning: exported var CommandHelpTemplate should have comment or be unexported (golint)
    • Line 50: warning: exported function Run should have comment or be unexported (golint)
    • k0s/pkg/asciitransport/io.go
    • Line 5: warning: exported function WithReader should have comment or be unexported (golint)
    • Line 11: warning: exported function WithWriter should have comment or be unexported (golint)
    • k0s/pkg/types.go
    • Line 7: warning: exported type Timer should have comment or be unexported (golint)
    • Line 11: warning: exported type Namer should have comment or be unexported (golint)
    • Line 15: warning: exported type IDer should have comment or be unexported (golint)
    • Line 19: warning: exported type Tider should have comment or be unexported (golint)
    • Line 25: warning: exported type Manager should have comment or be unexported (golint)
    • Line 35: warning: exported type Version should have comment or be unexported (golint)
    • k0s/pkg/fzf/algo/algo.go
    • Line 90: warning: exported var DEBUG should have comment or be unexported (golint)
    • Line 341: warning: exported function FuzzyMatchV2 should have comment or be unexported (golint)
    • Line 672: warning: don't use underscores in Go names; var pidx_ should be pidx (golint)
    • Line 721: warning: don't use underscores in Go names; var index_ should be index (golint)
    • Line 733: warning: don't use underscores in Go names; var pidx_ should be pidx (golint)
    • k0s/pkg/asciitransport/v2/core.go
    • Line 55: warning: exported type AsciiTransport should have comment or be unexported (golint)
    • Line 66: warning: exported method AsciiTransport.Close should have comment or be unexported (golint)
    • Line 66: warning: receiver name c should be consistent with previous receiver name at for AsciiTransport (golint)
    • Line 74: warning: exported method AsciiTransport.Done should have comment or be unexported (golint)
    • Line 74: warning: receiver name c should be consistent with previous receiver name at for AsciiTransport (golint)
    • Line 78: warning: receiver name c should be consistent with previous receiver name at for AsciiTransport (golint)
    • k0s/pkg/client/types.go
    • Line 11: warning: exported type Client should have comment or be unexported (golint)
    • Line 21: warning: exported type Config should have comment or be unexported (golint)
    • Line 40: warning: exported type Dialer should have comment or be unexported (golint)
    • Line 44: warning: exported type KeyStore should have comment or be unexported (golint)
    • k0s/pkg/asciitransport/logger.go
    • Line 8: warning: exported function WithLogger should have comment or be unexported (golint)
    • Line 14: warning: exported type Logger should have comment or be unexported (golint)
    • Line 19: warning: exported function NewLogger should have comment or be unexported (golint)
    • k0s/pkg/api/tunnel.go
    • Line 5: warning: exported type Tunnel should have comment or be unexported (golint)
    • Line 10: warning: exported const Terminal should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported function FromString should have comment or be unexported (golint)
    • k0s/pkg/agent/info/info.go
    • Line 45: warning: exported function EmptyInfo should have comment or be unexported (golint)
    • Line 49: warning: exported function CollectInfo should have comment or be unexported (golint)
    • k0s/pkg/hub/types.go
    • Line 13: warning: exported type AgentInfo should have comment or be unexported (golint)
    • Line 32: warning: exported type Config should have comment or be unexported (golint)
    • Line 40: warning: exported type Hub should have comment or be unexported (golint)
    • Line 51: warning: exported type AgentManager should have comment or be unexported (golint)
    • Line 59: warning: exported type Agent should have comment or be unexported (golint)
    • Line 68: warning: exported type RPC should have comment or be unexported (golint)
    • k0s/pkg/fzf/tui/light.go
    • Line 81: warning: comment on exported type LightRenderer should be of the form "LightRenderer ..." (with optional leading article) (golint)
    • Line 105: warning: exported type LightWindow should have comment or be unexported (golint)
    • Line 120: warning: exported function NewLightRenderer should have comment or be unexported (golint)
    • Line 181: warning: exported method LightRenderer.Init should have comment or be unexported (golint)
    • Line 324: warning: exported method LightRenderer.GetChar should have comment or be unexported (golint)
    • Line 594: warning: exported method LightRenderer.Pause should have comment or be unexported (golint)
    • Line 607: warning: exported method LightRenderer.Resume should have comment or be unexported (golint)
    • Line 625: warning: exported method LightRenderer.Clear should have comment or be unexported (golint)
    • Line 635: warning: exported method LightRenderer.RefreshWindows should have comment or be unexported (golint)
    • Line 639: warning: exported method LightRenderer.Refresh should have comment or be unexported (golint)
    • Line 643: warning: exported method LightRenderer.Close should have comment or be unexported (golint)
    • Line 665: warning: exported method LightRenderer.MaxX should have comment or be unexported (golint)
    • Line 669: warning: exported method LightRenderer.MaxY should have comment or be unexported (golint)
    • Line 673: warning: exported method LightRenderer.DoesAutoWrap should have comment or be unexported (golint)
    • Line 677: warning: exported method LightRenderer.NewWindow should have comment or be unexported (golint)
    • Line 741: warning: exported method LightWindow.Top should have comment or be unexported (golint)
    • Line 745: warning: exported method LightWindow.Left should have comment or be unexported (golint)
    • Line 749: warning: exported method LightWindow.Width should have comment or be unexported (golint)
    • Line 753: warning: exported method LightWindow.Height should have comment or be unexported (golint)
    • Line 757: warning: exported method LightWindow.Refresh should have comment or be unexported (golint)
    • Line 760: warning: exported method LightWindow.Close should have comment or be unexported (golint)
    • Line 763: warning: exported method LightWindow.X should have comment or be unexported (golint)
    • Line 767: warning: exported method LightWindow.Y should have comment or be unexported (golint)
    • Line 771: warning: exported method LightWindow.Enclose should have comment or be unexported (golint)
    • Line 776: warning: exported method LightWindow.Move should have comment or be unexported (golint)
    • Line 783: warning: exported method LightWindow.MoveAndClear should have comment or be unexported (golint)
    • Line 844: warning: exported method LightWindow.Print should have comment or be unexported (golint)
    • Line 852: warning: exported method LightWindow.CPrint should have comment or be unexported (golint)
    • Line 932: warning: exported method LightWindow.Fill should have comment or be unexported (golint)
    • Line 938: warning: exported method LightWindow.CFill should have comment or be unexported (golint)
    • Line 953: warning: exported method LightWindow.FinishFill should have comment or be unexported (golint)
    • Line 960: warning: exported method LightWindow.Erase should have comment or be unexported (golint)
    • k0s/pkg/cli/goproxy/main.go
    • Line 1: warning: package comment should be of the form "Package goproxy ..." (golint)
    • Line 72: warning: exported function Run should have comment or be unexported (golint)
    • Line 90: warning: exported function Main should have comment or be unexported (golint)
    • k0s/pkg/cli/gost/main.go
    • Line 12: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 25: warning: exported function Main should have comment or be unexported (golint)
    • k0s/pkg/wrap/hijack.go
    • Line 9: warning: exported function Hijack should have comment or be unexported (golint)
    • Line 13: warning: exported function HijackConn should have comment or be unexported (golint)
    • Line 20: warning: exported type Conn should have comment or be unexported (golint)
    • k0s/pkg/console/console.go
    • Line 25: warning: exported var ErrNotAConsole should have comment or be unexported (golint)
    • Line 27: warning: exported type File should have comment or be unexported (golint)
    • Line 36: warning: exported type Console should have comment or be unexported (golint)
    • k0s/pkg/exporter/env/handler.go
    • Line 65: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 70: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • k0s/pkg/tunnel/const.go
    • Line 5: warning: comment on exported const FingerPrintHeader should be of the form "FingerPrintHeader ..." (golint)
    • Line 7: warning: exported const KeepaliveInterval should have comment or be unexported (golint)
    • k0s/pkg/wrap/netconn_gorilla.go
    • Line 20: warning: exported function NetConn should have comment or be unexported (golint)
    • Line 74: warning: receiver name c should be consistent with previous receiver name wsw for netConn (golint)
    • k0s/pkg/cli/trojan/main.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 12: warning: exported function Run should have comment or be unexported (golint)
    • k0s/pkg/localcmd/localcmd.go
    • Line 1: warning: package comment should be of the form "Package localcmd ..." (golint)
    • Line 19: warning: exported method Factory.New should have comment or be unexported (golint)
    • Line 32: warning: exported function NewLc should have comment or be unexported (golint)
    • Line 72: warning: exported method Lc.Close should have comment or be unexported (golint)
    • Line 84: warning: exported method Lc.Resize should have comment or be unexported (golint)
    • k0s/pkg/version/version.go
    • Line 12: warning: exported var GitCommitString should have comment or be unexported (golint)
    • Line 20: warning: exported function GetVersion should have comment or be unexported (golint)
    • Line 32: warning: exported type Version should have comment or be unexported (golint)
    • Line 54: warning: exported function Decode should have comment or be unexported (golint)
    • k0s/pkg/fzf/util/chars.go
    • Line 15: warning: exported type Chars should have comment or be unexported (golint)
    • Line 65: warning: exported function RunesToChars should have comment or be unexported (golint)
    • Line 69: warning: exported method Chars.IsBytes should have comment or be unexported (golint)
    • Line 73: warning: exported method Chars.Bytes should have comment or be unexported (golint)
    • Line 84: warning: exported method Chars.Get should have comment or be unexported (golint)
    • Line 91: warning: exported method Chars.Length should have comment or be unexported (golint)
    • Line 133: warning: exported method Chars.TrailingWhitespaces should have comment or be unexported (golint)
    • Line 145: warning: exported method Chars.TrimTrailingWhitespaces should have comment or be unexported (golint)
    • Line 150: warning: exported method Chars.ToString should have comment or be unexported (golint)
    • Line 157: warning: exported method Chars.ToRunes should have comment or be unexported (golint)
    • Line 169: warning: exported method Chars.CopyRunes should have comment or be unexported (golint)
    • Line 179: warning: exported method Chars.Prepend should have comment or be unexported (golint)
    • k0s/pkg/hub/agent/info/info.go
    • Line 13: warning: exported type Meta should have comment or be unexported (golint)
    • Line 34: warning: comment on exported type Info should be of the form "Info ..." (with optional leading article) (golint)
    • Line 57: warning: exported function Decode should have comment or be unexported (golint)
    • Line 92: warning: exported method Info.SetIP should have comment or be unexported (golint)
    • Line 96: warning: exported method Info.GetOS should have comment or be unexported (golint)
    • Line 100: warning: exported method Info.GetPwd should have comment or be unexported (golint)
    • Line 104: warning: exported method Info.GetArch should have comment or be unexported (golint)
    • Line 108: warning: exported method Info.GetDistro should have comment or be unexported (golint)
    • Line 112: warning: exported method Info.GetUsername should have comment or be unexported (golint)
    • Line 116: warning: exported method Info.GetHostname should have comment or be unexported (golint)
    • Line 120: warning: exported method Info.GetGitSummary should have comment or be unexported (golint)
    • Line 124: warning: exported method Info.GetVersion should have comment or be unexported (golint)
    • Line 128: warning: exported method Info.GetID should have comment or be unexported (golint)
    • Line 132: warning: exported method Info.GetName should have comment or be unexported (golint)
    • Line 136: warning: exported method Info.GetTags should have comment or be unexported (golint)
    • Line 140: warning: exported method Info.GetHtpasswd should have comment or be unexported (golint)
    • Line 144: warning: exported method Info.GetAuth should have comment or be unexported (golint)
    • k0s/pkg/jsondns/unmarshal.go
    • Line 37: warning: exported function PrepareReply should have comment or be unexported (golint)
    • Line 52: warning: exported function Unmarshal should have comment or be unexported (golint)
    • Line 175: warning: exported type UnmarshalError should have comment or be unexported (golint)
    • k0s/pkg/asciitransport/v2/server.go
    • Line 22: warning: exported type AsciiTransportServer should have comment or be unexported (golint)
    • Line 26: warning: exported method AsciiTransportServer.Output should have comment or be unexported (golint)
    • Line 30: warning: exported method AsciiTransportServer.OutputFrom should have comment or be unexported (golint)
    • Line 43: warning: exported method AsciiTransportServer.ReadLoop should have comment or be unexported (golint)
    • Line 68: warning: exported function Server should have comment or be unexported (golint)
    • k0s/pkg/exporter/exporter_linux.go
    • Line 27: warning: exported type Logger should have comment or be unexported (golint)
    • Line 29: warning: exported method Logger.Log should have comment or be unexported (golint)
    • Line 35: warning: exported function NewHandler should have comment or be unexported (golint)
    • k0s/pkg/dohserver/config.go
    • Line 33: warning: exported type Config should have comment or be unexported (golint)
    • Line 46: warning: exported function LoadConfig should have comment or be unexported (golint)
    • k0s/pkg/asciitransport/v2/client.go
    • Line 21: warning: exported type AsciiTransportClient should have comment or be unexported (golint)
    • Line 25: warning: exported method AsciiTransportClient.Input should have comment or be unexported (golint)
    • Line 35: warning: exported method AsciiTransportClient.InputFrom should have comment or be unexported (golint)
    • Line 48: warning: exported method AsciiTransportClient.Resize should have comment or be unexported (golint)
    • Line 52: warning: exported method AsciiTransportClient.ReadLoop should have comment or be unexported (golint)
    • Line 67: warning: exported function Client should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words

    • k0s/cmd/mnt-etcd/main.go
    • Line 81: warning: "initalize" is a misspelling of "initialize" (misspell)
    • Line 105: warning: "initalize" is a misspelling of "initialize" (misspell)
    • Line 122: warning: "initalize" is a misspelling of "initialize" (misspell)