Preparing report...

Report for github.com/apache/apisix-dashboard

A+    Excellent!    Found 83 issues across 148 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!


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.


golint45%

Golint is a linter for Go source code.

    • apisix-dashboard/api/internal/core/migrate/migrate.go
    • Line 30: warning: exported var ErrConflict should have comment or be unexported (golint)
    • Line 33: warning: exported function Export should have comment or be unexported (golint)
    • Line 55: warning: exported type ConflictMode should have comment or be unexported (golint)
    • Line 58: warning: exported const ModeReturn should have comment (or a comment on this block) or be unexported (golint)
    • Line 63: warning: exported function Import should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/core/store/store_mock.go
    • Line 1: warning: package comment should be of the form "Package store ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 26: warning: exported type MockInterface should have comment or be unexported (golint)
    • Line 30: warning: exported method MockInterface.Get should have comment or be unexported (golint)
    • Line 35: warning: exported method MockInterface.List should have comment or be unexported (golint)
    • Line 62: warning: exported method MockInterface.Create should have comment or be unexported (golint)
    • Line 67: warning: exported method MockInterface.Update should have comment or be unexported (golint)
    • Line 72: warning: exported method MockInterface.BatchDelete should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/utils/utils.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 84: warning: exported function GetFlakeUid should have comment or be unexported (golint)
    • Line 92: warning: exported function GetFlakeUidStr should have comment or be unexported (golint)
    • Line 96: warning: exported function InterfaceToString should have comment or be unexported (golint)
    • Line 104: warning: comment on exported function ObjectClone should be of the form "ObjectClone ..." (golint)
    • Line 115: warning: exported function GenLabelMap should have comment or be unexported (golint)
    • Line 148: warning: exported function LabelContains should have comment or be unexported (golint)
    • Line 175: warning: comment on exported function StringSliceEqual should be of the form "StringSliceEqual ..." (golint)
    • Line 197: warning: comment on exported function ValueEqual should be of the form "ValueEqual ..." (golint)
    • apisix-dashboard/api/internal/handler/service/service.go
    • Line 1: warning: package comment should be of the form "Package service ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 38: warning: exported type Handler should have comment or be unexported (golint)
    • Line 44: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 52: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 71: warning: exported type GetInput should have comment or be unexported (golint)
    • Line 75: warning: exported method Handler.Get should have comment or be unexported (golint)
    • Line 91: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 96: warning: comment on exported method Handler.List should be of the form "List ..." (golint)
    • Line 157: warning: exported method Handler.Create should have comment or be unexported (golint)
    • Line 187: warning: exported type UpdateInput should have comment or be unexported (golint)
    • Line 192: warning: exported method Handler.Update should have comment or be unexported (golint)
    • Line 231: warning: exported type BatchDelete should have comment or be unexported (golint)
    • Line 235: warning: exported method Handler.BatchDelete should have comment or be unexported (golint)
    • Line 271: warning: exported type PatchInput should have comment or be unexported (golint)
    • Line 277: warning: exported method Handler.Patch should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/utils/closer.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 25: warning: exported type Closer should have comment or be unexported (golint)
    • Line 27: warning: exported function AppendToClosers should have comment or be unexported (golint)
    • Line 31: warning: exported function CloseAll should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/conf/conf.go
    • Line 1: warning: package comment should be of the form "Package conf ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 35: warning: exported const EnvPROD should have comment (or a comment on this block) or be unexported (golint)
    • Line 45: warning: exported var ENV should have comment or be unexported (golint)
    • Line 67: warning: exported type MTLS should have comment or be unexported (golint)
    • Line 73: warning: exported type Etcd should have comment or be unexported (golint)
    • Line 81: warning: exported type SSL should have comment or be unexported (golint)
    • Line 88: warning: exported type Listen should have comment or be unexported (golint)
    • Line 93: warning: exported type ErrorLog should have comment or be unexported (golint)
    • Line 98: warning: exported type AccessLog should have comment or be unexported (golint)
    • Line 102: warning: exported type Log should have comment or be unexported (golint)
    • Line 107: warning: exported type Conf should have comment or be unexported (golint)
    • Line 116: warning: exported type User should have comment or be unexported (golint)
    • Line 121: warning: exported type Authentication should have comment or be unexported (golint)
    • Line 127: warning: exported type Config should have comment or be unexported (golint)
    • Line 141: warning: exported function InitConf should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/schema/schema.go
    • Line 1: warning: package comment should be of the form "Package schema ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 34: warning: exported type SchemaHandler should have comment or be unexported (golint)
    • Line 37: warning: exported function NewSchemaHandler should have comment or be unexported (golint)
    • Line 41: warning: exported method SchemaHandler.ApplyRoute should have comment or be unexported (golint)
    • Line 49: warning: exported type SchemaInput should have comment or be unexported (golint)
    • Line 53: warning: exported method SchemaHandler.Schema should have comment or be unexported (golint)
    • Line 66: warning: exported type PluginSchemaInput should have comment or be unexported (golint)
    • Line 71: warning: exported method SchemaHandler.PluginSchema should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/data_loader/route_export.go
    • Line 1: warning: package comment should be of the form "Package data_loader ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 42: warning: exported type Handler should have comment or be unexported (golint)
    • Line 49: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 58: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 64: warning: exported type ExportInput should have comment or be unexported (golint)
    • Line 97: warning: exported type AuthType should have comment or be unexported (golint)
    • Line 100: warning: exported const BasicAuth should have comment (or a comment on this block) or be unexported (golint)
    • Line 501: warning: exported function GetPathNumber should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/schema/plugin.go
    • Line 1: warning: package comment should be of the form "Package schema ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 31: warning: exported type Handler should have comment or be unexported (golint)
    • Line 34: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 38: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 43: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 47: warning: exported method Handler.Plugins should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/utils/consts/api_error.go
    • Line 1: warning: package comment should be of the form "Package consts ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 23: warning: exported type WrapperHandle should have comment or be unexported (golint)
    • Line 25: warning: comment on exported type ApiError should be of the form "ApiError ..." (with optional leading article) (golint)
    • Line 38: warning: exported function InvalidParam should have comment or be unexported (golint)
    • Line 42: warning: exported function SystemError should have comment or be unexported (golint)
    • Line 46: warning: exported function NotFound should have comment or be unexported (golint)
    • apisix-dashboard/api/test/e2e/http.go
    • Line 1: warning: package comment should be of the form "Package e2e ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 32: warning: exported type UploadFile should have comment or be unexported (golint)
    • Line 39: warning: exported function PostFile should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/plugin_config/plugin_config.go
    • Line 1: warning: package comment should be of the form "Package plugin_config ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 39: warning: exported type Handler should have comment or be unexported (golint)
    • Line 44: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 51: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 70: warning: exported type GetInput should have comment or be unexported (golint)
    • Line 74: warning: exported method Handler.Get should have comment or be unexported (golint)
    • Line 85: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 91: warning: comment on exported method Handler.List should be of the form "List ..." (golint)
    • Line 155: warning: exported method Handler.Create should have comment or be unexported (golint)
    • Line 166: warning: exported type UpdateInput should have comment or be unexported (golint)
    • Line 171: warning: exported method Handler.Update should have comment or be unexported (golint)
    • Line 191: warning: exported type BatchDelete should have comment or be unexported (golint)
    • Line 195: warning: exported method Handler.BatchDelete should have comment or be unexported (golint)
    • Line 230: warning: exported type PatchInput should have comment or be unexported (golint)
    • Line 236: warning: exported method Handler.Patch should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/filter/recover.go
    • Line 1: warning: package comment should be of the form "Package filter ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 39: warning: exported function RecoverHandler should have comment or be unexported (golint)
    • Line 57: warning: exported function WrapGo should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/route.go
    • Line 1: warning: package comment should be of the form "Package internal ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 48: warning: exported function SetUpRouter should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/core/storage/etcd.go
    • Line 1: warning: package comment should be of the form "Package storage ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 48: warning: exported var Client should have comment or be unexported (golint)
    • Line 51: warning: exported type EtcdV3Storage should have comment or be unexported (golint)
    • Line 55: warning: exported function InitETCDClient should have comment or be unexported (golint)
    • Line 88: warning: exported function GenEtcdStorage should have comment or be unexported (golint)
    • Line 94: warning: exported function NewETCDStorage should have comment or be unexported (golint)
    • Line 114: warning: exported function Close should have comment or be unexported (golint)
    • Line 122: warning: exported method EtcdV3Storage.Close should have comment or be unexported (golint)
    • Line 130: warning: exported method EtcdV3Storage.Get should have comment or be unexported (golint)
    • Line 144: warning: exported method EtcdV3Storage.List should have comment or be unexported (golint)
    • Line 174: warning: exported method EtcdV3Storage.Create should have comment or be unexported (golint)
    • Line 183: warning: exported method EtcdV3Storage.Update should have comment or be unexported (golint)
    • Line 192: warning: exported method EtcdV3Storage.BatchDelete should have comment or be unexported (golint)
    • Line 207: warning: exported method EtcdV3Storage.Watch should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/global_rule/global_rule.go
    • Line 1: warning: package comment should be of the form "Package global_rule ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 36: warning: exported type Handler should have comment or be unexported (golint)
    • Line 40: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 46: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 66: warning: exported type GetInput should have comment or be unexported (golint)
    • Line 70: warning: exported method Handler.Get should have comment or be unexported (golint)
    • Line 80: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 84: warning: comment on exported method Handler.List should be of the form "List ..." (golint)
    • Line 127: warning: exported type SetInput should have comment or be unexported (golint)
    • Line 132: warning: exported method Handler.Set should have comment or be unexported (golint)
    • Line 153: warning: exported type PatchInput should have comment or be unexported (golint)
    • Line 159: warning: exported method Handler.Patch should have comment or be unexported (golint)
    • Line 190: warning: exported type BatchDeleteInput should have comment or be unexported (golint)
    • Line 194: warning: exported method Handler.BatchDelete should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/server_info/server_info.go
    • Line 1: warning: package comment should be of the form "Package server_info ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 33: warning: exported type Handler should have comment or be unexported (golint)
    • Line 37: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 43: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 50: warning: exported type GetInput should have comment or be unexported (golint)
    • Line 54: warning: exported method Handler.Get should have comment or be unexported (golint)
    • Line 65: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 70: warning: exported method Handler.List should have comment or be unexported (golint)
    • apisix-dashboard/api/test/e2e/base.go
    • Line 1: warning: package comment should be of the form "Package e2e ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 40: warning: exported var Token should have comment or be unexported (golint)
    • Line 105: warning: exported function ManagerApiExpect should have comment or be unexported (golint)
    • Line 109: warning: exported function APISIXExpect should have comment or be unexported (golint)
    • Line 113: warning: exported function APISIXHTTPSExpect should have comment or be unexported (golint)
    • Line 137: warning: exported function BatchTestServerPort should have comment or be unexported (golint)
    • Line 171: warning: exported type HttpTestCase should have comment or be unexported (golint)
    • Line 179: warning: don't use underscores in Go names; struct field Headers_test should be HeadersTest (golint)
    • Line 294: warning: exported function RunTestCases should have comment or be unexported (golint)
    • Line 298: warning: exported function ReadAPISIXErrorLog should have comment or be unexported (golint)
    • Line 311: warning: exported function CleanAPISIXErrorLog should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/ssl/ssl.go
    • Line 1: warning: package comment should be of the form "Package ssl ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 43: warning: exported type Handler should have comment or be unexported (golint)
    • Line 47: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 82: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 107: warning: exported type GetInput should have comment or be unexported (golint)
    • Line 111: warning: exported method Handler.Get should have comment or be unexported (golint)
    • Line 131: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 136: warning: comment on exported method Handler.List should be of the form "List ..." (golint)
    • Line 213: warning: exported method Handler.Create should have comment or be unexported (golint)
    • Line 236: warning: exported type UpdateInput should have comment or be unexported (golint)
    • Line 241: warning: exported method Handler.Update should have comment or be unexported (golint)
    • Line 276: warning: exported type PatchInput should have comment or be unexported (golint)
    • Line 282: warning: exported method Handler.Patch should have comment or be unexported (golint)
    • Line 316: warning: exported type BatchDelete should have comment or be unexported (golint)
    • Line 320: warning: exported method Handler.BatchDelete should have comment or be unexported (golint)
    • Line 330: warning: exported function ParseCert should have comment or be unexported (golint)
    • Line 393: warning: comment on exported method Handler.Validate should be of the form "Validate ..." (golint)
    • Line 430: warning: exported type ExistInput should have comment or be unexported (golint)
    • Line 444: warning: exported type ExistCheckInput should have comment or be unexported (golint)
    • Line 448: warning: comment on exported method Handler.Exist should be of the form "Exist ..." (golint)
    • apisix-dashboard/api/internal/handler/healthz/healthz.go
    • Line 1: warning: package comment should be of the form "Package healthz ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 27: warning: exported type Handler should have comment or be unexported (golint)
    • Line 30: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 34: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • apisix-dashboard/api/cmd/root.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 69: warning: exported function Execute should have comment or be unexported (golint)
    • apisix-dashboard/api/cmd/service.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 28: warning: exported type Service should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/route/route.go
    • Line 1: warning: package comment should be of the form "Package route ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 45: warning: exported type Handler should have comment or be unexported (golint)
    • Line 52: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 61: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 85: warning: exported type PatchInput should have comment or be unexported (golint)
    • Line 91: warning: exported method Handler.Patch should have comment or be unexported (golint)
    • Line 121: warning: exported type GetInput should have comment or be unexported (golint)
    • Line 125: warning: comment on exported method Handler.Get should be of the form "Get ..." (golint)
    • Line 192: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 213: warning: exported method Handler.List should have comment or be unexported (golint)
    • Line 308: warning: exported method Handler.Create should have comment or be unexported (golint)
    • Line 397: warning: exported type UpdateInput should have comment or be unexported (golint)
    • Line 402: warning: exported method Handler.Update should have comment or be unexported (golint)
    • Line 514: warning: exported type BatchDelete should have comment or be unexported (golint)
    • Line 518: warning: exported method Handler.BatchDelete should have comment or be unexported (golint)
    • Line 538: warning: exported type ExistCheckInput should have comment or be unexported (golint)
    • Line 543: warning: comment on exported method Handler.Exist should be of the form "Exist ..." (golint)
    • apisix-dashboard/api/internal/filter/authentication.go
    • Line 1: warning: package comment should be of the form "Package filter ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 33: warning: exported type AuthenticationMiddleware should have comment or be unexported (golint)
    • Line 37: warning: exported method AuthenticationMiddleware.Handle should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/upstream/upstream.go
    • Line 1: warning: package comment should be of the form "Package upstream ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 39: warning: exported type Handler should have comment or be unexported (golint)
    • Line 45: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 53: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 77: warning: exported type GetInput should have comment or be unexported (golint)
    • Line 81: warning: exported method Handler.Get should have comment or be unexported (golint)
    • Line 95: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 100: warning: comment on exported method Handler.List should be of the form "List ..." (golint)
    • Line 159: warning: exported method Handler.Create should have comment or be unexported (golint)
    • Line 177: warning: exported type UpdateInput should have comment or be unexported (golint)
    • Line 182: warning: exported method Handler.Update should have comment or be unexported (golint)
    • Line 208: warning: exported type BatchDelete should have comment or be unexported (golint)
    • Line 212: warning: exported method Handler.BatchDelete should have comment or be unexported (golint)
    • Line 270: warning: exported type PatchInput should have comment or be unexported (golint)
    • Line 276: warning: exported method Handler.Patch should have comment or be unexported (golint)
    • Line 306: warning: exported type ExistInput should have comment or be unexported (golint)
    • Line 310: warning: exported type ExistCheckInput should have comment or be unexported (golint)
    • Line 315: warning: exported method Handler.Exist should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/core/entity/entity.go
    • Line 1: warning: package comment should be of the form "Package entity ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 26: warning: exported type BaseInfo should have comment or be unexported (golint)
    • Line 32: warning: exported method BaseInfo.GetBaseInfo should have comment or be unexported (golint)
    • Line 36: warning: exported method BaseInfo.Creating should have comment or be unexported (golint)
    • Line 49: warning: exported method BaseInfo.Updating should have comment or be unexported (golint)
    • Line 55: warning: exported method BaseInfo.KeyCompat should have comment or be unexported (golint)
    • Line 61: warning: exported type BaseInfoSetter should have comment or be unexported (golint)
    • Line 65: warning: exported type BaseInfoGetter should have comment or be unexported (golint)
    • Line 69: warning: exported type Status should have comment or be unexported (golint)
    • Line 71: warning: comment on exported type Route should be of the form "Route ..." (with optional leading article) (golint)
    • Line 99: warning: comment on exported type TimeoutValue should be of the form "TimeoutValue ..." (with optional leading article) (golint)
    • Line 101: warning: exported type Timeout should have comment or be unexported (golint)
    • Line 107: warning: exported type Node should have comment or be unexported (golint)
    • Line 114: warning: exported type K8sInfo should have comment or be unexported (golint)
    • Line 122: warning: exported type Healthy should have comment or be unexported (golint)
    • Line 128: warning: exported type UnHealthy should have comment or be unexported (golint)
    • Line 136: warning: exported type Active should have comment or be unexported (golint)
    • Line 149: warning: exported type Passive should have comment or be unexported (golint)
    • Line 155: warning: exported type HealthChecker should have comment or be unexported (golint)
    • Line 160: warning: exported type UpstreamTLS should have comment or be unexported (golint)
    • Line 165: warning: exported type UpstreamKeepalivePool should have comment or be unexported (golint)
    • Line 171: warning: exported type UpstreamDef should have comment or be unexported (golint)
    • Line 193: warning: comment on exported type Upstream should be of the form "Upstream ..." (with optional leading article) (golint)
    • Line 199: warning: exported type UpstreamNameResponse should have comment or be unexported (golint)
    • Line 204: warning: exported method Upstream.Parse2NameResponse should have comment or be unexported (golint)
    • Line 214: warning: comment on exported type Consumer should be of the form "Consumer ..." (with optional leading article) (golint)
    • Line 224: warning: exported type SSLClient should have comment or be unexported (golint)
    • Line 229: warning: comment on exported type SSL should be of the form "SSL ..." (with optional leading article) (golint)
    • Line 246: warning: comment on exported type Service should be of the form "Service ..." (with optional leading article) (golint)
    • Line 259: warning: exported type Script should have comment or be unexported (golint)
    • Line 264: warning: exported type RequestValidation should have comment or be unexported (golint)
    • Line 270: warning: comment on exported type GlobalPlugins should be of the form "GlobalPlugins ..." (with optional leading article) (golint)
    • Line 276: warning: exported type ServerInfo should have comment or be unexported (golint)
    • Line 286: warning: comment on exported type PluginConfig should be of the form "PluginConfig ..." (with optional leading article) (golint)
    • apisix-dashboard/api/internal/log/log.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 20: warning: exported var DefLogger should have comment or be unexported (golint)
    • Line 23: warning: exported type Type should have comment or be unexported (golint)
    • Line 26: warning: exported const AccessLog should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported type Interface should have comment or be unexported (golint)
    • Line 86: warning: exported function Debug should have comment or be unexported (golint)
    • Line 89: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 92: warning: exported function Info should have comment or be unexported (golint)
    • Line 95: warning: exported function Infof should have comment or be unexported (golint)
    • Line 98: warning: exported function Warn should have comment or be unexported (golint)
    • Line 101: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 104: warning: exported function Error should have comment or be unexported (golint)
    • Line 107: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 110: warning: exported function Fatal should have comment or be unexported (golint)
    • Line 113: warning: exported function Fatalf should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/data_loader/route_import.go
    • Line 1: warning: package comment should be of the form "Package data_loader ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 46: warning: exported type ImportHandler should have comment or be unexported (golint)
    • Line 52: warning: exported function NewImportHandler should have comment or be unexported (golint)
    • Line 63: warning: exported method ImportHandler.ApplyRoute should have comment or be unexported (golint)
    • Line 68: warning: exported type ImportInput should have comment or be unexported (golint)
    • Line 74: warning: exported method ImportHandler.Import should have comment or be unexported (golint)
    • Line 213: warning: exported type PathValue should have comment or be unexported (golint)
    • Line 247: warning: exported function OpenAPI3ToRoute should have comment or be unexported (golint)
    • apisix-dashboard/api/test/e2enew/base/base.go
    • Line 1: warning: package comment should be of the form "Package base ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 39: warning: exported var UpstreamIp should have comment or be unexported (golint)
    • Line 47: warning: exported function GetToken should have comment or be unexported (golint)
    • Line 73: warning: exported function ManagerApiExpect should have comment or be unexported (golint)
    • Line 78: warning: exported function APISIXExpect should have comment or be unexported (golint)
    • Line 83: warning: exported function PrometheusExporterExpect should have comment or be unexported (golint)
    • Line 88: warning: exported function APISIXHTTPSExpect should have comment or be unexported (golint)
    • Line 113: warning: exported var SleepTime should have comment or be unexported (golint)
    • Line 115: warning: exported type HttpTestCase should have comment or be unexported (golint)
    • Line 123: warning: don't use underscores in Go names; struct field Headers_test should be HeadersTest (golint)
    • Line 133: warning: exported function RunTestCase should have comment or be unexported (golint)
    • Line 236: warning: exported function ReadAPISIXErrorLog should have comment or be unexported (golint)
    • Line 250: warning: exported function CleanAPISIXErrorLog should have comment or be unexported (golint)
    • Line 266: warning: exported function GetResourceList should have comment or be unexported (golint)
    • Line 273: warning: exported function CleanResource should have comment or be unexported (golint)
    • Line 292: warning: exported function GetJwtToken should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/label/label.go
    • Line 1: warning: package comment should be of the form "Package label ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 40: warning: exported type Handler should have comment or be unexported (golint)
    • Line 51: warning: exported type Pair should have comment or be unexported (golint)
    • Line 56: warning: exported method Pair.MarshalJSON should have comment or be unexported (golint)
    • Line 61: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 72: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 77: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 102: warning: comment on exported method Handler.List should be of the form "List ..." (golint)
    • apisix-dashboard/api/internal/core/store/validate.go
    • Line 1: warning: package comment should be of the form "Package store ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 33: warning: exported type Validator should have comment or be unexported (golint)
    • Line 36: warning: exported type JsonSchemaValidator should have comment or be unexported (golint)
    • Line 40: warning: exported function NewJsonSchemaValidator should have comment or be unexported (golint)
    • Line 54: warning: exported method JsonSchemaValidator.Validate should have comment or be unexported (golint)
    • Line 73: warning: exported type APISIXJsonSchemaValidator should have comment or be unexported (golint)
    • Line 78: warning: exported function NewAPISIXJsonSchemaValidator should have comment or be unexported (golint)
    • Line 233: warning: exported method APISIXJsonSchemaValidator.Validate should have comment or be unexported (golint)
    • Line 319: warning: exported type APISIXSchemaValidator should have comment or be unexported (golint)
    • Line 323: warning: exported function NewAPISIXSchemaValidator should have comment or be unexported (golint)
    • Line 340: warning: exported method APISIXSchemaValidator.Validate should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/utils/consts/error.go
    • Line 1: warning: package comment should be of the form "Package consts ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 26: warning: exported const ErrBadRequest should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: comment on exported var ErrUsernamePassword should be of the form "ErrUsernamePassword ..." (golint)
    • Line 38: warning: comment on exported var ErrIDUsername should be of the form "ErrIDUsername ..." (golint)
    • Line 40: warning: comment on exported var ErrParameterID should be of the form "ErrParameterID ..." (golint)
    • Line 42: warning: comment on exported var ErrRouteData should be of the form "ErrRouteData ..." (golint)
    • Line 44: warning: comment on exported var ErrImportFile should be of the form "ErrImportFile ..." (golint)
    • Line 46: warning: comment on exported var ErrSSLCertificate should be of the form "ErrSSLCertificate ..." (golint)
    • Line 48: warning: comment on exported var ErrSSLCertificateResolution should be of the form "ErrSSLCertificateResolution ..." (golint)
    • Line 50: warning: comment on exported var ErrSSLKeyAndCert should be of the form "ErrSSLKeyAndCert ..." (golint)
    • Line 55: warning: comment on exported var ErrInvalidRequest should be of the form "ErrInvalidRequest ..." (golint)
    • Line 57: warning: exported var ErrSchemaValidateFailed should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/core/storage/storage.go
    • Line 1: warning: package comment should be of the form "Package storage ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 21: warning: exported type Interface should have comment or be unexported (golint)
    • Line 30: warning: exported type WatchResponse should have comment or be unexported (golint)
    • Line 36: warning: exported type Keypair should have comment or be unexported (golint)
    • Line 41: warning: exported type Event should have comment or be unexported (golint)
    • Line 46: warning: exported type EventType should have comment or be unexported (golint)
    • Line 49: warning: exported var EventTypePut should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/authentication/authentication.go
    • Line 1: warning: package comment should be of the form "Package authentication ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 34: warning: exported type Handler should have comment or be unexported (golint)
    • Line 37: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 41: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 46: warning: exported type UserSession should have comment or be unexported (golint)
    • Line 50: warning: comment on exported type LoginInput should be of the form "LoginInput ..." (with optional leading article) (golint)
    • apisix-dashboard/api/internal/handler/consumer/consumer.go
    • Line 1: warning: package comment should be of the form "Package consumer ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 34: warning: exported type Handler should have comment or be unexported (golint)
    • Line 38: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 44: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 57: warning: exported type GetInput should have comment or be unexported (golint)
    • Line 61: warning: exported method Handler.Get should have comment or be unexported (golint)
    • Line 71: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 76: warning: comment on exported method Handler.List should be of the form "List ..." (golint)
    • Line 141: warning: exported type SetInput should have comment or be unexported (golint)
    • Line 146: warning: exported method Handler.Set should have comment or be unexported (golint)
    • Line 180: warning: exported type BatchDeleteInput should have comment or be unexported (golint)
    • Line 184: warning: exported method Handler.BatchDelete should have comment or be unexported (golint)
    • apisix-dashboard/api/test/e2enew/base/http.go
    • Line 1: warning: package comment should be of the form "Package base ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 34: warning: exported type UploadFile should have comment or be unexported (golint)
    • Line 39: warning: exported function HttpGet should have comment or be unexported (golint)
    • Line 43: warning: exported function HttpDelete should have comment or be unexported (golint)
    • Line 47: warning: exported function HttpPut should have comment or be unexported (golint)
    • Line 51: warning: exported function HttpPost should have comment or be unexported (golint)
    • Line 87: warning: exported function BatchTestServerPort should have comment or be unexported (golint)
    • Line 108: warning: exported function GetReader should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/core/store/storehub.go
    • Line 1: warning: package comment should be of the form "Package store ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 29: warning: exported type HubKey should have comment or be unexported (golint)
    • Line 32: warning: exported const HubKeyConsumer should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported function InitStore should have comment or be unexported (golint)
    • Line 78: warning: exported function GetStore should have comment or be unexported (golint)
    • Line 85: warning: exported function RangeStore should have comment or be unexported (golint)
    • Line 95: warning: exported function InitStores should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/utils/runtime/runtime.go
    • Line 1: warning: package comment should be of the form "Package runtime ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 27: warning: exported var ActuallyPanic should have comment or be unexported (golint)
    • Line 30: warning: exported var PanicHandlers should have comment or be unexported (golint)
    • Line 32: warning: exported function HandlePanic should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/migrate/migrate.go
    • Line 1: warning: package comment should be of the form "Package migrate ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 39: warning: exported type Handler should have comment or be unexported (golint)
    • Line 41: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 45: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 50: warning: exported type ExportInput should have comment or be unexported (golint)
    • Line 52: warning: exported method Handler.ExportConfig should have comment or be unexported (golint)
    • Line 76: warning: exported type ImportOutput should have comment or be unexported (golint)
    • Line 86: warning: exported method Handler.ImportConfig should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/log/zap.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 39: warning: exported function InitLogger should have comment or be unexported (golint)
    • Line 43: warning: exported function GetLogger should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/utils/json_patch.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: exported function MergeJson should have comment or be unexported (golint)
    • Line 33: warning: exported function PatchJson should have comment or be unexported (golint)
    • Line 58: warning: exported function MergePatch should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/tool/tool.go
    • Line 1: warning: package comment should be of the form "Package tool ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 28: warning: exported type Handler should have comment or be unexported (golint)
    • Line 31: warning: exported type InfoOutput should have comment or be unexported (golint)
    • Line 36: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 40: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 44: warning: exported method Handler.Version should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/route_online_debug/route_online_debug.go
    • Line 1: warning: package comment should be of the form "Package route_online_debug ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 40: warning: exported type Handler should have comment or be unexported (golint)
    • Line 43: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 47: warning: exported type ProtocolSupport should have comment or be unexported (golint)
    • Line 51: warning: exported method Handler.ApplyRoute should have comment or be unexported (golint)
    • Line 56: warning: exported type DebugOnlineInput should have comment or be unexported (golint)
    • Line 65: warning: exported type Result should have comment or be unexported (golint)
    • Line 72: warning: exported method Handler.DebugRequestForwarding should have comment or be unexported (golint)
    • Line 92: warning: exported type HTTPProtocolSupport should have comment or be unexported (golint)
    • Line 95: warning: exported method HTTPProtocolSupport.RequestForwarding should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/filter/schema.go
    • Line 1: warning: package comment should be of the form "Package filter ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 49: warning: exported const StatusDisable should have comment (or a comment on this block) or be unexported (golint)
    • Line 177: warning: exported function SchemaCheck should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/handler/handler.go
    • Line 1: warning: package comment should be of the form "Package handler ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 53: warning: exported type RegisterFactory should have comment or be unexported (golint)
    • Line 55: warning: exported type RouteRegister should have comment or be unexported (golint)
    • Line 59: warning: exported function SpecCodeResponse should have comment or be unexported (golint)
    • Line 76: warning: exported type ErrorTransformMiddleware should have comment or be unexported (golint)
    • Line 80: warning: exported method ErrorTransformMiddleware.Handle should have comment or be unexported (golint)
    • Line 97: warning: exported function IDCompare should have comment or be unexported (golint)
    • Line 111: warning: exported function NameExistCheck should have comment or be unexported (golint)
    • apisix-dashboard/api/internal/core/store/store.go
    • Line 39: warning: exported type Pagination should have comment or be unexported (golint)
    • Line 44: warning: exported type Interface should have comment or be unexported (golint)
    • Line 52: warning: exported type GenericStore should have comment or be unexported (golint)
    • Line 61: warning: exported type GenericStoreOption should have comment or be unexported (golint)
    • Line 69: warning: exported function NewGenericStore should have comment or be unexported (golint)
    • Line 98: warning: exported method GenericStore.Init should have comment or be unexported (golint)
    • Line 145: warning: exported method GenericStore.Get should have comment or be unexported (golint)
    • Line 154: warning: exported type ListInput should have comment or be unexported (golint)
    • Line 163: warning: exported type ListOutput should have comment or be unexported (golint)
    • Line 187: warning: exported method GenericStore.List should have comment or be unexported (golint)
    • Line 235: warning: exported method GenericStore.Range should have comment or be unexported (golint)
    • Line 260: warning: exported method GenericStore.CreateCheck should have comment or be unexported (golint)
    • Line 290: warning: exported method GenericStore.Create should have comment or be unexported (golint)
    • Line 308: warning: exported method GenericStore.Update should have comment or be unexported (golint)
    • Line 345: warning: exported method GenericStore.BatchDelete should have comment or be unexported (golint)
    • Line 354: warning: exported method GenericStore.Close should have comment or be unexported (golint)
    • Line 359: warning: exported method GenericStore.StringToObjPtr should have comment or be unexported (golint)
    • Line 376: warning: exported method GenericStore.GetObjStorageKey should have comment or be unexported (golint)
    • Line 380: warning: exported method GenericStore.GetStorageKey should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!