Preparing report...

Report for github.com/IPA-CyberLab/kmgm

A    Great!    Found 79 issues across 101 files

Tweet

gofmt97%

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!


gocyclo94%

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.


golint24%

Golint is a linter for Go source code.

    • kmgm/dname/protoconv.go
    • Line 5: warning: exported function FromProtoStruct should have comment or be unexported (golint)
    • Line 22: warning: exported method Config.ToProtoStruct should have comment or be unexported (golint)
    • kmgm/action/serve/certificateservice/service.go
    • Line 24: warning: exported type Service should have comment or be unexported (golint)
    • Line 30: warning: exported function New should have comment or be unexported (golint)
    • Line 34: warning: exported method Service.IssuePreflight should have comment or be unexported (golint)
    • Line 58: warning: exported method Service.IssueCertificate should have comment or be unexported (golint)
    • Line 95: warning: exported method Service.GetCertificate should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/app/app.go
    • Line 30: warning: exported function SimpleTimeEncoder should have comment or be unexported (golint)
    • Line 46: warning: exported function New should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/setup/setup.go
    • Line 19: warning: exported type Config should have comment or be unexported (golint)
    • Line 23: warning: don't use underscores in Go names; struct field XXX_NoDefault should be XXXNoDefault (golint)
    • Line 26: warning: exported method Config.Verify should have comment or be unexported (golint)
    • Line 34: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • Line 74: warning: error var CantRunInteractiveCASetupErr should have name of the form ErrFoo (golint)
    • Line 74: warning: exported var CantRunInteractiveCASetupErr should have comment or be unexported (golint)
    • Line 76: warning: exported type EnsureCAMode should have comment or be unexported (golint)
    • Line 79: warning: exported const DisallowNonInteractiveSetup should have comment (or a comment on this block) or be unexported (golint)
    • Line 84: warning: exported type IncompatibleCertErr should have comment or be unexported (golint)
    • Line 92: warning: exported method IncompatibleCertErr.Is should have comment or be unexported (golint)
    • Line 101: warning: exported function EnsureCA should have comment or be unexported (golint)
    • Line 150: warning: exported var Command should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/serve/serve.go
    • Line 16: warning: exported var IssueHttpDefaultShutdown should have comment or be unexported (golint)
    • Line 18: warning: exported var Command should have comment or be unexported (golint)
    • kmgm/wcrypto/key.go
    • Line 22: warning: exported var ErrKeyAnyForGenerateKey should have comment or be unexported (golint)
    • Line 24: warning: exported function GenerateKey should have comment or be unexported (golint)
    • Line 63: warning: exported function ExtractPublicKey should have comment or be unexported (golint)
    • Line 78: warning: exported var ErrPublicKeyMismatch should have comment or be unexported (golint)
    • Line 80: warning: exported function VerifyPublicKeyMatch should have comment or be unexported (golint)
    • Line 116: warning: exported function SubjectKeyIdFromPubkey should have comment or be unexported (golint)
    • kmgm/action/serve/tokenauth.go
    • Line 17: warning: exported type TokenAuthProvider should have comment or be unexported (golint)
    • Line 22: warning: exported type FixedTokenAuthProvider should have comment or be unexported (golint)
    • Line 30: warning: exported var ErrBadToken should have comment or be unexported (golint)
    • Line 31: warning: exported var ErrTokenExpired should have comment or be unexported (golint)
    • Line 33: warning: exported method FixedTokenAuthProvider.Authenticate should have comment or be unexported (golint)
    • Line 48: warning: exported method FixedTokenAuthProvider.LogHelpMessage should have comment or be unexported (golint)
    • Line 63: warning: exported function NewTokenFileAuthProvider should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/tool/pubkeyhash/pubkeyhash.go
    • Line 22: warning: exported type KeyHash should have comment or be unexported (golint)
    • Line 27: warning: exported function ExtractPublicKeyHashesFromPem should have comment or be unexported (golint)
    • Line 100: warning: exported var Command should have comment or be unexported (golint)
    • kmgm/pemparser/parser.go
    • Line 11: warning: exported function ForeachPemBlock should have comment or be unexported (golint)
    • Line 27: warning: exported var ErrMultipleCertificateRequestBlocks should have comment or be unexported (golint)
    • Line 29: warning: exported function ParseCertificateRequest should have comment or be unexported (golint)
    • Line 50: warning: exported function ParseCertificates should have comment or be unexported (golint)
    • Line 71: warning: exported function ParseSinglePrivateKeyBlock should have comment or be unexported (golint)
    • Line 85: warning: exported function ParsePrivateKey should have comment or be unexported (golint)
    • kmgm/frontend/promptuife/frontend.go
    • Line 18: warning: exported var PromptTemplate should have comment or be unexported (golint)
    • Line 22: warning: exported type Frontend should have comment or be unexported (golint)
    • Line 26: warning: exported method Frontend.Confirm should have comment or be unexported (golint)
    • Line 43: warning: exported var ErrAbortEdit should have comment or be unexported (golint)
    • Line 49: warning: exported method Frontend.IsInteractive should have comment or be unexported (golint)
    • Line 51: warning: exported method Frontend.EditText should have comment or be unexported (golint)
    • Line 106: warning: exported method Frontend.Configure should have comment or be unexported (golint)
    • kmgm/keyusage/keyusage.go
    • Line 12: warning: exported type KeyUsage should have comment or be unexported (golint)
    • Line 17: warning: exported var KeyUsageCA should have comment or be unexported (golint)
    • Line 24: warning: exported var KeyUsageTLSServer should have comment or be unexported (golint)
    • Line 29: warning: exported var KeyUsageTLSClient should have comment or be unexported (golint)
    • Line 34: warning: exported var KeyUsageTLSClientServer should have comment or be unexported (golint)
    • Line 39: warning: exported method KeyUsage.Clone should have comment or be unexported (golint)
    • Line 46: warning: exported method KeyUsage.Verify should have comment or be unexported (golint)
    • Line 62: warning: exported function PresetFromString should have comment or be unexported (golint)
    • Line 74: warning: exported function KeyUsageFromString should have comment or be unexported (golint)
    • Line 86: warning: exported function ExtKeyUsageFromString should have comment or be unexported (golint)
    • Line 100: warning: exported method KeyUsage.UnmarshalYAML should have comment or be unexported (golint)
    • Line 151: warning: exported function FromProtoStruct should have comment or be unexported (golint)
    • Line 167: warning: exported method KeyUsage.ToProtoStruct should have comment or be unexported (golint)
    • Line 179: warning: exported function FromCertificate should have comment or be unexported (golint)
    • Line 186: warning: exported method KeyUsage.UnmarshalFlag should have comment or be unexported (golint)
    • Line 186: warning: receiver name p should be consistent with previous receiver name u for KeyUsage (golint)
    • Line 196: warning: exported method KeyUsage.Equals should have comment or be unexported (golint)
    • Line 196: warning: receiver name a should be consistent with previous receiver name u for KeyUsage (golint)
    • Line 217: warning: exported method KeyUsage.Preset should have comment or be unexported (golint)
    • Line 217: warning: receiver name ku should be consistent with previous receiver name u for KeyUsage (golint)
    • kmgm/cmd/kmgm/tool/pubkeyhash/format.go
    • Line 5: warning: exported type FormatType should have comment or be unexported (golint)
    • Line 8: warning: exported const FormatFull should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported function FormatTypeFromString should have comment or be unexported (golint)
    • Line 23: warning: exported method FormatType.ShouldOutputLabel should have comment or be unexported (golint)
    • kmgm/frontend/editstruct.go
    • Line 46: warning: exported function PrependYamlCommentLiteral should have comment or be unexported (golint)
    • Line 63: warning: exported function StripErrorText should have comment or be unexported (golint)
    • Line 74: warning: exported function YamlEscapeString should have comment or be unexported (golint)
    • Line 86: warning: exported function CallVerifyMethod should have comment or be unexported (golint)
    • Line 140: warning: exported function DumpTemplate should have comment or be unexported (golint)
    • Line 163: warning: exported function EditStructWithVerifier should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/show/format.go
    • Line 5: warning: exported type FormatType should have comment or be unexported (golint)
    • Line 8: warning: exported const FormatFull should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported function FormatTypeFromString should have comment or be unexported (golint)
    • Line 34: warning: exported method FormatType.ShouldOutputInfo should have comment or be unexported (golint)
    • Line 43: warning: exported method FormatType.ShouldOutputPEM should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/show/show.go
    • Line 25: warning: exported function HexStr should have comment or be unexported (golint)
    • Line 55: warning: exported function PrintCertInfo should have comment or be unexported (golint)
    • Line 165: warning: exported type FindCertificateWithPrefixType should have comment or be unexported (golint)
    • Line 167: warning: exported function FindCertificateWithPrefix should have comment or be unexported (golint)
    • Line 222: warning: exported function ActionImpl should have comment or be unexported (golint)
    • Line 265: warning: exported var Command should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/serve/testserver/testserver.go
    • Line 19: warning: exported const BootstrapToken should have comment or be unexported (golint)
    • Line 21: warning: exported type TestServer should have comment or be unexported (golint)
    • Line 33: warning: exported type Option should have comment or be unexported (golint)
    • Line 35: warning: exported function RunSetup should have comment or be unexported (golint)
    • Line 37: warning: exported function Run should have comment or be unexported (golint)
    • kmgm/remote/issue/issue.go
    • Line 14: warning: exported type Config should have comment or be unexported (golint)
    • Line 16: warning: exported var DefaultConfig should have comment or be unexported (golint)
    • Line 18: warning: exported function IssueCertificate should have comment or be unexported (golint)
    • kmgm/ipapi/ipapi.go
    • Line 13: warning: exported type Result should have comment or be unexported (golint)
    • Line 29: warning: exported const Endpoint should have comment or be unexported (golint)
    • Line 31: warning: exported var EnableQuery should have comment or be unexported (golint)
    • Line 32: warning: exported var ErrQueryDisabled should have comment or be unexported (golint)
    • Line 33: warning: exported var MockResult should have comment or be unexported (golint)
    • Line 35: warning: exported function Query should have comment or be unexported (golint)
    • Line 79: warning: exported function QueryCached should have comment or be unexported (golint)
    • kmgm/action/serve/serve.go
    • Line 58: warning: exported const BearerPrefix should have comment or be unexported (golint)
    • Line 119: warning: exported type Server should have comment or be unexported (golint)
    • Line 123: warning: exported function StartServer should have comment or be unexported (golint)
    • Line 264: warning: exported function Run should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/testkmgm/testkmgm.go
    • Line 21: warning: exported var NowDefault should have comment or be unexported (golint)
    • Line 29: warning: exported function Env should have comment or be unexported (golint)
    • Line 46: warning: context.Context should be the first parameter of a function (golint)
    • Line 46: warning: exported function Run should have comment or be unexported (golint)
    • kmgm/remote/transportcredentials.go
    • Line 22: warning: exported function NewTransportCredentials should have comment or be unexported (golint)
    • Line 29: warning: exported method TransportCredentials.Info should have comment or be unexported (golint)
    • Line 33: warning: exported method TransportCredentials.ClientHandshake should have comment or be unexported (golint)
    • Line 68: warning: exported method TransportCredentials.ServerHandshake should have comment or be unexported (golint)
    • Line 72: warning: exported method TransportCredentials.Clone should have comment or be unexported (golint)
    • Line 79: warning: exported method TransportCredentials.OverrideServerName should have comment or be unexported (golint)
    • kmgm/frontend/frontend.go
    • Line 3: warning: exported type ConfigItem should have comment or be unexported (golint)
    • Line 9: warning: exported type Frontend should have comment or be unexported (golint)
    • kmgm/domainname/domainname.go
    • Line 3: warning: exported var MockResult should have comment or be unexported (golint)
    • Line 5: warning: exported function DNSDomainname should have comment or be unexported (golint)
    • kmgm/action/serve/issuehandler/handler.go
    • Line 26: warning: exported type Handler should have comment or be unexported (golint)
    • Line 34: warning: exported function New should have comment or be unexported (golint)
    • Line 66: warning: exported method Handler.CurlString should have comment or be unexported (golint)
    • Line 87: warning: comment on exported const SkewWorkaround should be of the form "SkewWorkaround ..." (golint)
    • kmgm/wcrypto/keytype.go
    • Line 11: warning: exported type KeyType should have comment or be unexported (golint)
    • Line 14: warning: exported const KeyAny should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported var DefaultKeyType should have comment or be unexported (golint)
    • Line 21: warning: exported var ServerKeyType should have comment or be unexported (golint)
    • Line 38: warning: exported function KeyTypeFromString should have comment or be unexported (golint)
    • Line 53: warning: exported function KeyTypeOfPub should have comment or be unexported (golint)
    • Line 80: warning: exported type UnexpectedKeyTypeErr should have comment or be unexported (golint)
    • Line 89: warning: exported method UnexpectedKeyTypeErr.Is should have comment or be unexported (golint)
    • Line 94: warning: exported method KeyType.CompatibleWith should have comment or be unexported (golint)
    • Line 94: warning: receiver name expected should be consistent with previous receiver name kt for KeyType (golint)
    • Line 104: warning: exported method KeyType.UnmarshalFlag should have comment or be unexported (golint)
    • Line 104: warning: receiver name p should be consistent with previous receiver name kt for KeyType (golint)
    • Line 114: warning: exported method KeyType.UnmarshalYAML should have comment or be unexported (golint)
    • Line 114: warning: receiver name p should be consistent with previous receiver name kt for KeyType (golint)
    • kmgm/cmd/kmgm/issue/issue.go
    • Line 28: warning: exported var ErrCertKeyPathConflict should have comment or be unexported (golint)
    • Line 30: warning: exported function PrepareKeyTypePath should have comment or be unexported (golint)
    • Line 89: warning: exported function EnsurePrivateKey should have comment or be unexported (golint)
    • Line 135: warning: exported function PromptCertPath should have comment or be unexported (golint)
    • Line 181: warning: exported const ConfigTemplateText should have comment or be unexported (golint)
    • Line 257: warning: exported type Config should have comment or be unexported (golint)
    • Line 266: warning: don't use underscores in Go names; struct field XXX_NoDefault should be XXXNoDefault (golint)
    • Line 269: warning: exported function VerifyKeyType should have comment or be unexported (golint)
    • Line 295: warning: exported type IncompatibleCertErr should have comment or be unexported (golint)
    • Line 303: warning: exported method IncompatibleCertErr.Is should have comment or be unexported (golint)
    • Line 312: warning: exported type CertStillValidErr should have comment or be unexported (golint)
    • Line 323: warning: exported method CertStillValidErr.Is should have comment or be unexported (golint)
    • Line 328: warning: exported method CertStillValidErr.ExitCode should have comment or be unexported (golint)
    • Line 378: warning: exported method Config.Verify should have comment or be unexported (golint)
    • Line 393: warning: exported type Strategy should have comment or be unexported (golint)
    • Line 399: warning: exported function ActionImpl should have comment or be unexported (golint)
    • Line 490: warning: exported type Local should have comment or be unexported (golint)
    • Line 496: warning: exported method Local.EnsureCA should have comment or be unexported (golint)
    • Line 503: warning: exported method Local.CASubject should have comment or be unexported (golint)
    • Line 512: warning: exported method Local.Issue should have comment or be unexported (golint)
    • Line 516: warning: exported var Command should have comment or be unexported (golint)
    • kmgm/action/setup/nameconstraints.go
    • Line 8: warning: exported type NameConstraints should have comment or be unexported (golint)
    • Line 16: warning: exported method NameConstraints.UnmarshalYAML should have comment or be unexported (golint)
    • Line 49: warning: exported method NameConstraints.IsEmpty should have comment or be unexported (golint)
    • Line 49: warning: receiver name nc should be consistent with previous receiver name p for NameConstraints (golint)
    • Line 66: warning: exported method NameConstraints.Strings should have comment or be unexported (golint)
    • Line 66: warning: receiver name nc should be consistent with previous receiver name p for NameConstraints (golint)
    • kmgm/pemparser/consts.go
    • Line 4: warning: exported const RSAPrivateKeyPemType should have comment (or a comment on this block) or be unexported (golint)
    • kmgm/period/validityperiod.go
    • Line 9: warning: exported type ValidityPeriod should have comment or be unexported (golint)
    • Line 21: warning: exported var FarFuture should have comment or be unexported (golint)
    • Line 30: warning: exported method ValidityPeriod.GetNotAfter should have comment or be unexported (golint)
    • Line 49: warning: exported method ValidityPeriod.UnmarshalFlag should have comment or be unexported (golint)
    • Line 65: warning: exported method ValidityPeriod.UnmarshalYAML should have comment or be unexported (golint)
    • kmgm/remote/conn.go
    • Line 19: warning: exported type ConnectionInfo should have comment or be unexported (golint)
    • Line 32: warning: exported method ConnectionInfo.TransportCredentials should have comment or be unexported (golint)
    • Line 87: warning: exported method ConnectionInfo.Dial should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/main.go
    • Line 12: warning: exported type ExitCoder should have comment or be unexported (golint)
    • Line 16: warning: exported function ExitCodeOfError should have comment or be unexported (golint)
    • kmgm/action/env.go
    • Line 23: warning: exported type Environment should have comment or be unexported (golint)
    • Line 36: warning: exported function NewEnvironment should have comment or be unexported (golint)
    • Line 51: warning: exported method Environment.Clone should have comment or be unexported (golint)
    • Line 66: warning: exported method Environment.SaveConnectionInfo should have comment or be unexported (golint)
    • Line 82: warning: exported method Environment.LoadConnectionInfo should have comment or be unexported (golint)
    • Line 102: warning: exported method Environment.EnsureClientConn should have comment or be unexported (golint)
    • Line 119: warning: exported method Environment.Profile should have comment or be unexported (golint)
    • Line 123: warning: exported var GlobalEnvironment should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/show/ifchanged.go
    • Line 10: warning: exported type IfChangedWriteFile should have comment or be unexported (golint)
    • Line 18: warning: exported function NewIfChangedWriteFile should have comment or be unexported (golint)
    • Line 40: warning: exported method IfChangedWriteFile.Close should have comment or be unexported (golint)
    • kmgm/testutils/testutils.go
    • Line 24: warning: exported function PrepareBasedir should have comment or be unexported (golint)
    • Line 36: warning: exported function ExpectLogMessage should have comment or be unexported (golint)
    • Line 49: warning: exported function ExpectErrMessage should have comment or be unexported (golint)
    • Line 67: warning: exported function ExpectErr should have comment or be unexported (golint)
    • kmgm/remote/user/authorization.go
    • Line 8: warning: exported method User.IsAllowedToIssueCertificate should have comment or be unexported (golint)
    • Line 16: warning: exported method User.IsAllowedToGetCertificate should have comment or be unexported (golint)
    • kmgm/storage/storage.go
    • Line 20: warning: exported type Storage should have comment or be unexported (golint)
    • Line 24: warning: exported function New should have comment or be unexported (golint)
    • Line 32: warning: exported method Storage.ClientPrivateKeyPath should have comment or be unexported (golint)
    • Line 36: warning: exported method Storage.ClientCertPath should have comment or be unexported (golint)
    • Line 40: warning: exported method Storage.ConnectionInfoPath should have comment or be unexported (golint)
    • Line 51: warning: exported method Storage.GeoIpCachePath should have comment or be unexported (golint)
    • Line 56: warning: exported type Profile should have comment or be unexported (golint)
    • Line 60: warning: comment on exported const DefaultProfileName should be of the form "DefaultProfileName ..." (golint)
    • Line 65: warning: exported function VerifyProfileName should have comment or be unexported (golint)
    • Line 72: warning: exported method Storage.Profile should have comment or be unexported (golint)
    • Line 87: warning: exported method Storage.Profiles should have comment or be unexported (golint)
    • Line 114: warning: exported method Profile.Name should have comment or be unexported (golint)
    • Line 125: warning: exported method Profile.CAPrivateKeyPath should have comment or be unexported (golint)
    • Line 125: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 129: warning: exported method Profile.CACertPath should have comment or be unexported (golint)
    • Line 129: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 133: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 137: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 141: warning: exported method Profile.IssueDBPath should have comment or be unexported (golint)
    • Line 141: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 145: warning: exported function CheckFileNotExist should have comment or be unexported (golint)
    • Line 160: warning: exported type CAStatusCode should have comment or be unexported (golint)
    • Line 163: warning: exported const ValidCA should have comment (or a comment on this block) or be unexported (golint)
    • Line 184: warning: exported type CAStatus should have comment or be unexported (golint)
    • Line 221: warning: exported method Profile.Status should have comment or be unexported (golint)
    • Line 221: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 280: warning: exported function WriteCertificateDerFile should have comment or be unexported (golint)
    • Line 288: warning: exported function WriteCertificateFile should have comment or be unexported (golint)
    • Line 292: warning: exported method Profile.WriteCACertificateDer should have comment or be unexported (golint)
    • Line 292: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 301: warning: exported method Profile.WriteServerCertificate should have comment or be unexported (golint)
    • Line 301: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 310: warning: exported const InlinePrefix should have comment or be unexported (golint)
    • Line 312: warning: exported function ReadFileOrInlineText should have comment or be unexported (golint)
    • Line 320: warning: exported function ReadCertificateFile should have comment or be unexported (golint)
    • Line 336: warning: exported method Profile.ReadCACertificate should have comment or be unexported (golint)
    • Line 336: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 341: warning: exported method Profile.ReadServerCertificate should have comment or be unexported (golint)
    • Line 341: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 346: warning: exported function WritePrivateKeyFile should have comment or be unexported (golint)
    • Line 357: warning: exported method Profile.WriteCAPrivateKey should have comment or be unexported (golint)
    • Line 357: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 365: warning: exported method Profile.WriteServerPrivateKey should have comment or be unexported (golint)
    • Line 365: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 373: warning: exported function ReadPrivateKeyFile should have comment or be unexported (golint)
    • Line 385: warning: exported method Profile.ReadCAPrivateKey should have comment or be unexported (golint)
    • Line 385: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • Line 390: warning: exported method Profile.ReadServerPrivateKey should have comment or be unexported (golint)
    • Line 390: warning: receiver name s should be consistent with previous receiver name p for Profile (golint)
    • kmgm/storage/issuedb/state.go
    • Line 9: warning: exported type State should have comment or be unexported (golint)
    • Line 12: warning: exported const IssueInProgress should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported method State.MarshalJSON should have comment or be unexported (golint)
    • Line 31: warning: exported method State.UnmarshalJSON should have comment or be unexported (golint)
    • kmgm/wcrypto/token.go
    • Line 12: warning: exported const TokenBitsLength should have comment or be unexported (golint)
    • Line 14: warning: exported function GenBase64Token should have comment or be unexported (golint)
    • kmgm/action/serve/config.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 25: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • kmgm/cmd/kmgm/remote/issue/issue.go
    • Line 18: warning: exported type Remote should have comment or be unexported (golint)
    • Line 23: warning: exported method Remote.EnsureCA should have comment or be unexported (golint)
    • Line 40: warning: exported method Remote.CASubject should have comment or be unexported (golint)
    • Line 66: warning: exported method Remote.Issue should have comment or be unexported (golint)
    • Line 70: warning: exported var Command should have comment or be unexported (golint)
    • kmgm/consts/consts.go
    • Line 8: warning: exported const NodesOutOfSyncThreshold should have comment or be unexported (golint)
    • Line 9: warning: exported const AuthProfileName should have comment or be unexported (golint)
    • Line 10: warning: exported const PrometheusNamespace should have comment or be unexported (golint)
    • Line 13: warning: exported var OIDExtensionKeyUsage should have comment or be unexported (golint)
    • kmgm/frontend/noninteractive.go
    • Line 10: warning: exported type NonInteractive should have comment or be unexported (golint)
    • Line 16: warning: exported method NonInteractive.Confirm should have comment or be unexported (golint)
    • Line 22: warning: comment on exported function IsNoDefaultSpecifiedInYaml should be of the form "IsNoDefaultSpecifiedInYaml ..." (golint)
    • Line 39: warning: exported method NonInteractive.IsInteractive should have comment or be unexported (golint)
    • Line 41: warning: exported method NonInteractive.EditText should have comment or be unexported (golint)
    • Line 55: warning: exported method NonInteractive.Configure should have comment or be unexported (golint)
    • kmgm/wcrypto/cert.go
    • Line 10: warning: exported function VerifyCACert should have comment or be unexported (golint)
    • Line 29: warning: exported function VerifyServerCert should have comment or be unexported (golint)
    • Line 48: warning: exported function VerifyCACertAndKey should have comment or be unexported (golint)
    • kmgm/dname/config.go
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 27: warning: exported function FromGeoip should have comment or be unexported (golint)
    • Line 46: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • Line 68: warning: exported method Config.ToPkixName should have comment or be unexported (golint)
    • Line 94: warning: exported function FromPkixName should have comment or be unexported (golint)
    • Line 122: warning: exported method Config.Verify should have comment or be unexported (golint)
    • Line 151: warning: exported method Config.IsEmpty should have comment or be unexported (golint)
    • Line 180: warning: exported method Config.CompatibleWith should have comment or be unexported (golint)
    • Line 180: warning: receiver name a should be consistent with previous receiver name cfg for Config (golint)
    • kmgm/structflags/tag.go
    • Line 13: warning: exported type ParsedTag should have comment or be unexported (golint)
    • Line 20: warning: exported function Parse should have comment or be unexported (golint)
    • Line 57: warning: exported method ParsedTag.ToCliFlag should have comment or be unexported (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 105: warning: exported method ParsedTag.ToDurationFlag should have comment or be unexported (golint)
    • kmgm/storage/issuedb/issuedb.go
    • Line 17: warning: exported var ErrNotExist should have comment or be unexported (golint)
    • Line 19: warning: exported type Entry should have comment or be unexported (golint)
    • Line 25: warning: exported method Entry.ParseCertificate should have comment or be unexported (golint)
    • Line 37: warning: exported function RandInt63 should have comment or be unexported (golint)
    • Line 47: warning: exported type IssueDB should have comment or be unexported (golint)
    • Line 51: warning: exported function New should have comment or be unexported (golint)
    • Line 57: warning: exported method IssueDB.Initialize should have comment or be unexported (golint)
    • Line 98: warning: exported method IssueDB.Entries should have comment or be unexported (golint)
    • Line 148: warning: exported method IssueDB.Query should have comment or be unexported (golint)
    • Line 163: warning: exported method IssueDB.AllocateSerialNumber should have comment or be unexported (golint)
    • Line 189: warning: exported method IssueDB.IssueCertificate should have comment or be unexported (golint)
    • kmgm/action/setup/config.go
    • Line 15: warning: exported var ErrSubjectEmpty should have comment or be unexported (golint)
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 28: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • Line 36: warning: exported function EmptyConfig should have comment or be unexported (golint)
    • Line 42: warning: exported function ConfigFromCert should have comment or be unexported (golint)
    • Line 55: warning: exported method Config.CompatibleWith should have comment or be unexported (golint)
    • Line 67: warning: exported method Config.Verify should have comment or be unexported (golint)
    • Line 67: warning: receiver name cfg should be consistent with previous receiver name a for Config (golint)
    • kmgm/httperr/error.go
    • Line 3: warning: exported type ErrorWithStatusCode should have comment or be unexported (golint)
    • Line 12: warning: exported method ErrorWithStatusCode.GetStatusCode should have comment or be unexported (golint)
    • Line 20: warning: exported function StatusCodeFromError should have comment or be unexported (golint)
    • kmgm/pemparser/marshaller.go
    • Line 13: warning: exported function MarshalPrivateKey should have comment or be unexported (golint)
    • Line 37: warning: exported function MarshalCertificateDer should have comment or be unexported (golint)
    • Line 44: warning: exported function MarshalCertificateRequestDer should have comment or be unexported (golint)
    • kmgm/frontend/validate/path.go
    • Line 10: warning: exported function Dir should have comment or be unexported (golint)
    • Line 31: warning: exported function File should have comment or be unexported (golint)
    • Line 79: warning: exported function MkdirAndCheckWritable should have comment or be unexported (golint)
    • kmgm/period/days.go
    • Line 11: warning: exported type Days should have comment or be unexported (golint)
    • Line 23: warning: exported method Days.UnmarshalFlag should have comment or be unexported (golint)
    • Line 50: warning: exported method Days.UnmarshalYAML should have comment or be unexported (golint)
    • kmgm/san/san.go
    • Line 15: warning: exported var PunyProfile should have comment or be unexported (golint)
    • Line 17: warning: exported function VerifyDNSNameEntry should have comment or be unexported (golint)
    • Line 56: warning: exported type Names should have comment or be unexported (golint)
    • Line 61: warning: exported method Names.Verify should have comment or be unexported (golint)
    • Line 70: warning: exported method Names.CompatibleWith should have comment or be unexported (golint)
    • Line 70: warning: receiver name a should be consistent with previous receiver name ns for Names (golint)
    • Line 88: warning: exported method Names.Empty should have comment or be unexported (golint)
    • Line 128: warning: exported method Names.Concat should have comment or be unexported (golint)
    • Line 128: warning: receiver name a should be consistent with previous receiver name ns for Names (golint)
    • Line 152: warning: exported function Parse should have comment or be unexported (golint)
    • Line 164: warning: exported function MustParse should have comment or be unexported (golint)
    • Line 172: warning: exported method Names.UnmarshalYAML should have comment or be unexported (golint)
    • Line 188: warning: exported function FromCertificate should have comment or be unexported (golint)
    • Line 195: warning: exported function ForThisHost should have comment or be unexported (golint)
    • Line 219: warning: exported function ForListenAddr should have comment or be unexported (golint)
    • Line 236: warning: exported method Names.UnmarshalFlag should have comment or be unexported (golint)
    • Line 236: warning: receiver name p should be consistent with previous receiver name ns for Names (golint)
    • kmgm/remote/user/user.go
    • Line 15: warning: exported var Anonymous should have comment or be unexported (golint)
    • Line 20: warning: exported var BootstrapToken should have comment or be unexported (golint)
    • Line 25: warning: exported function ClientCert should have comment or be unexported (golint)
    • kmgm/san/protoconv.go
    • Line 9: warning: exported function FromProtoStruct should have comment or be unexported (golint)
    • Line 28: warning: exported method Names.ToProtoStruct should have comment or be unexported (golint)
    • kmgm/action/issue/config.go
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 31: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • Line 54: warning: exported function EmptyConfig should have comment or be unexported (golint)
    • Line 60: warning: exported function ConfigFromCert should have comment or be unexported (golint)
    • Line 75: warning: exported method Config.CompatibleWith should have comment or be unexported (golint)
    • Line 93: warning: exported var ErrValidityPeriodExpired should have comment or be unexported (golint)
    • Line 95: warning: exported method Config.Verify should have comment or be unexported (golint)
    • Line 95: warning: receiver name cfg should be consistent with previous receiver name a for Config (golint)
    • kmgm/cmd/kmgm/list/list.go
    • Line 19: warning: exported function CertInfo should have comment or be unexported (golint)
    • Line 26: warning: exported function LsProfile should have comment or be unexported (golint)
    • Line 41: warning: exported var Command should have comment or be unexported (golint)
    • kmgm/structflags/flags.go
    • Line 11: warning: exported var DurationType should have comment or be unexported (golint)
    • Line 13: warning: exported type Unmarshaler should have comment or be unexported (golint)
    • Line 17: warning: exported var UnmarshalerType should have comment or be unexported (golint)
    • Line 78: warning: exported function PopulateStructFromCliContext should have comment or be unexported (golint)
    • Line 116: warning: exported function PopulateFlagsFromStruct should have comment or be unexported (golint)
    • Line 125: warning: exported function MustPopulateFlagsFromStruct 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.


misspell98%

Misspell Finds commonly misspelled English words