Preparing report...

Report for github.com/dragonflyoss/Dragonfly2

A+    Excellent!    Found 160 issues across 276 files

Tweet

gofmt100%

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

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


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.

    • Dragonfly2/pkg/cache/cache_test.go
    • Line 592: warning: cyclomatic complexity 30 of function TestGetWithExpiration() is high (> 15) (gocyclo)
    • Line 248: warning: cyclomatic complexity 16 of function testFillAndSerialize() is high (> 15) (gocyclo)
    • Line 41: warning: cyclomatic complexity 16 of function TestCache() is high (> 15) (gocyclo)

golint44%

Golint is a linter for Go source code.

    • Dragonfly2/manager/store/orm/security_domain.go
    • Line 15: warning: exported type SecurityDomainTable should have comment or be unexported (golint)
    • Line 28: warning: exported type SecurityDomainStore should have comment or be unexported (golint)
    • Line 34: warning: exported function NewSecurityDomainStore should have comment or be unexported (golint)
    • Line 49: warning: exported function SecurityDomainToTable should have comment or be unexported (golint)
    • Line 60: warning: exported function SecurityDomainToSchema should have comment or be unexported (golint)
    • Line 86: warning: exported method SecurityDomainStore.Add should have comment or be unexported (golint)
    • Line 101: warning: exported method SecurityDomainStore.Delete should have comment or be unexported (golint)
    • Line 124: warning: exported method SecurityDomainStore.Update should have comment or be unexported (golint)
    • Line 148: warning: exported method SecurityDomainStore.Get should have comment or be unexported (golint)
    • Line 160: warning: exported method SecurityDomainStore.List should have comment or be unexported (golint)
    • Dragonfly2/client/daemon/peer/peertask_bitmap.go
    • Line 21: warning: exported type Bitmap should have comment or be unexported (golint)
    • Line 27: warning: exported function NewBitmap should have comment or be unexported (golint)
    • Line 34: warning: exported function NewBitmapWithCap should have comment or be unexported (golint)
    • Line 41: warning: exported method Bitmap.IsSet should have comment or be unexported (golint)
    • Line 48: warning: exported method Bitmap.Set should have comment or be unexported (golint)
    • Line 60: warning: exported method Bitmap.Settled should have comment or be unexported (golint)
    • Line 68: warning: exported method Bitmap.Sets should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/types/seed_task_info.go
    • Line 19: warning: exported type SeedTask should have comment or be unexported (golint)
    • Line 39: warning: comment on exported method SeedTask.IsFrozen should be of the form "IsFrozen ..." (golint)
    • Line 44: warning: comment on exported method SeedTask.IsWait should be of the form "IsWait ..." (golint)
    • Line 49: warning: comment on exported method SeedTask.IsError should be of the form "IsError ..." (golint)
    • Line 54: warning: exported method SeedTask.IsDone should have comment or be unexported (golint)
    • Dragonfly2/manager/store/orm/cdn_cluster.go
    • Line 15: warning: exported type CDNClusterTable should have comment or be unexported (golint)
    • Line 27: warning: exported type CDNClusterStore should have comment or be unexported (golint)
    • Line 33: warning: exported function NewCDNClusterStore should have comment or be unexported (golint)
    • Line 48: warning: exported function CDNClusterToTable should have comment or be unexported (golint)
    • Line 58: warning: exported function CDNClusterToSchema should have comment or be unexported (golint)
    • Line 83: warning: exported method CDNClusterStore.Add should have comment or be unexported (golint)
    • Line 98: warning: exported method CDNClusterStore.Delete should have comment or be unexported (golint)
    • Line 121: warning: exported method CDNClusterStore.Update should have comment or be unexported (golint)
    • Line 145: warning: exported method CDNClusterStore.Get should have comment or be unexported (golint)
    • Line 157: warning: exported method CDNClusterStore.List should have comment or be unexported (golint)
    • Dragonfly2/scheduler/server/scheduler_server.go
    • Line 35: warning: exported type SchedulerServer should have comment or be unexported (golint)
    • Line 80: warning: exported method SchedulerServer.RegisterPeerTask should have comment or be unexported (golint)
    • Line 213: warning: exported method SchedulerServer.ReportPieceResult should have comment or be unexported (golint)
    • Line 231: warning: exported method SchedulerServer.ReportPeerResult should have comment or be unexported (golint)
    • Line 268: warning: exported method SchedulerServer.LeaveTask should have comment or be unexported (golint)
    • Dragonfly2/scheduler/server/server.go
    • Line 36: warning: exported type Server should have comment or be unexported (golint)
    • Line 46: warning: exported function New should have comment or be unexported (golint)
    • Line 102: warning: exported method Server.Serve should have comment or be unexported (golint)
    • Line 128: warning: exported method Server.Stop should have comment or be unexported (golint)
    • Dragonfly2/scheduler/manager/host_manager.go
    • Line 26: warning: exported const HostLoadCDN should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type HostManager should have comment or be unexported (golint)
    • Line 40: warning: exported method HostManager.Add should have comment or be unexported (golint)
    • Line 53: warning: exported method HostManager.Delete should have comment or be unexported (golint)
    • Line 57: warning: exported method HostManager.Get should have comment or be unexported (golint)
    • Line 71: warning: exported method HostManager.CalculateLoad should have comment or be unexported (golint)
    • Dragonfly2/manager/store/store.go
    • Line 7: warning: exported type ResourceType should have comment or be unexported (golint)
    • Line 10: warning: exported const SchedulerCluster should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type Op should have comment or be unexported (golint)
    • Line 29: warning: exported type OpOption should have comment or be unexported (golint)
    • Line 31: warning: exported type Store should have comment or be unexported (golint)
    • Line 39: warning: exported method Op.ApplyOpts should have comment or be unexported (golint)
    • Line 45: warning: exported function WithResourceType should have comment or be unexported (golint)
    • Line 51: warning: exported function WithClusterID should have comment or be unexported (golint)
    • Line 57: warning: exported function WithInstanceID should have comment or be unexported (golint)
    • Line 63: warning: exported function WithMarker should have comment or be unexported (golint)
    • Dragonfly2/client/daemon/storage/storage_manager.go
    • Line 46: warning: exported type TaskStorageDriver should have comment or be unexported (golint)
    • Line 74: warning: exported type Manager should have comment or be unexported (golint)
    • Line 85: warning: exported var ErrTaskNotFound should have comment or be unexported (golint)
    • Line 90: warning: exported const GCName should have comment (or a comment on this block) or be unexported (golint)
    • Line 110: warning: exported type GCCallback should have comment or be unexported (golint)
    • Line 112: warning: exported function NewStorageManager should have comment or be unexported (golint)
    • Line 162: warning: exported function WithStorageOption should have comment or be unexported (golint)
    • Dragonfly2/pkg/rpc/cdnsystem/server/server.go
    • Line 42: warning: comment on exported type SeederServer should be of the form "SeederServer ..." (with optional leading article) (golint)
    • Line 124: warning: exported function StatSeedStart should have comment or be unexported (golint)
    • Line 132: warning: exported function StatSeedFinish should have comment or be unexported (golint)
    • Dragonfly2/pkg/structure/sortedlist/sorted_list.go
    • Line 24: warning: exported const BucketMaxLength should have comment or be unexported (golint)
    • Line 25: warning: exported const InnerBucketMaxLength should have comment or be unexported (golint)
    • Line 27: warning: exported type Item should have comment or be unexported (golint)
    • Line 31: warning: exported type SortedList should have comment or be unexported (golint)
    • Line 39: warning: exported function NewSortedList should have comment or be unexported (golint)
    • Line 48: warning: exported method SortedList.Add should have comment or be unexported (golint)
    • Line 61: warning: exported method SortedList.Update should have comment or be unexported (golint)
    • Line 87: warning: exported method SortedList.UpdateOrAdd should have comment or be unexported (golint)
    • Line 114: warning: exported method SortedList.Delete should have comment or be unexported (golint)
    • Line 125: warning: exported method SortedList.Range should have comment or be unexported (golint)
    • Line 129: warning: exported method SortedList.RangeLimit should have comment or be unexported (golint)
    • Line 153: warning: exported method SortedList.RangeReverse should have comment or be unexported (golint)
    • Line 157: warning: exported method SortedList.RangeReverseLimit should have comment or be unexported (golint)
    • Line 180: warning: exported method SortedList.Size should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/daemon/mgr/progress/manager.go
    • Line 41: warning: exported type Manager should have comment or be unexported (golint)
    • Line 51: warning: exported method Manager.SetTaskMgr should have comment or be unexported (golint)
    • Line 55: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 66: warning: exported method Manager.InitSeedProgress should have comment or be unexported (golint)
    • Line 87: warning: exported method Manager.WatchSeedProgress should have comment or be unexported (golint)
    • Line 117: warning: comment on exported method Manager.PublishPiece should be of the form "PublishPiece ..." (golint)
    • Line 147: warning: exported method Manager.PublishTask should have comment or be unexported (golint)
    • Line 168: warning: exported method Manager.Clear should have comment or be unexported (golint)
    • Line 198: warning: exported method Manager.GetPieces should have comment or be unexported (golint)
    • Dragonfly2/manager/configsvc/service.go
    • Line 19: warning: exported var KeepAliveTimeoutMax should have comment or be unexported (golint)
    • Line 22: warning: exported const InstanceActive should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported type ConfigSvc should have comment or be unexported (golint)
    • Line 56: warning: exported function NewConfigSvc should have comment or be unexported (golint)
    • Line 204: warning: exported method ConfigSvc.Stop should have comment or be unexported (golint)
    • Line 209: warning: exported method ConfigSvc.GetSchedulers should have comment or be unexported (golint)
    • Line 252: warning: exported method ConfigSvc.KeepAlive should have comment or be unexported (golint)
    • Line 299: warning: exported method ConfigSvc.GetInstanceAndClusterConfig should have comment or be unexported (golint)
    • Line 339: warning: exported method ConfigSvc.AddSchedulerCluster should have comment or be unexported (golint)
    • Line 353: warning: exported method ConfigSvc.DeleteSchedulerCluster should have comment or be unexported (golint)
    • Line 369: warning: exported method ConfigSvc.UpdateSchedulerCluster should have comment or be unexported (golint)
    • Line 395: warning: exported method ConfigSvc.GetSchedulerCluster should have comment or be unexported (golint)
    • Line 413: warning: exported method ConfigSvc.ListSchedulerClusters should have comment or be unexported (golint)
    • Line 427: warning: exported method ConfigSvc.AddSchedulerInstance should have comment or be unexported (golint)
    • Line 447: warning: exported method ConfigSvc.DeleteSchedulerInstance should have comment or be unexported (golint)
    • Line 464: warning: exported method ConfigSvc.UpdateSchedulerInstance should have comment or be unexported (golint)
    • Line 500: warning: exported method ConfigSvc.GetSchedulerInstance should have comment or be unexported (golint)
    • Line 526: warning: exported method ConfigSvc.ListSchedulerInstances should have comment or be unexported (golint)
    • Line 540: warning: exported method ConfigSvc.AddCDNCluster should have comment or be unexported (golint)
    • Line 557: warning: exported method ConfigSvc.DeleteCDNCluster should have comment or be unexported (golint)
    • Line 573: warning: exported method ConfigSvc.UpdateCDNCluster should have comment or be unexported (golint)
    • Line 599: warning: exported method ConfigSvc.GetCDNCluster should have comment or be unexported (golint)
    • Line 617: warning: exported method ConfigSvc.ListCDNClusters should have comment or be unexported (golint)
    • Line 631: warning: exported method ConfigSvc.AddCDNInstance should have comment or be unexported (golint)
    • Line 653: warning: exported method ConfigSvc.DeleteCDNInstance should have comment or be unexported (golint)
    • Line 670: warning: exported method ConfigSvc.UpdateCDNInstance should have comment or be unexported (golint)
    • Line 705: warning: exported method ConfigSvc.GetCDNInstance should have comment or be unexported (golint)
    • Line 731: warning: exported method ConfigSvc.ListCDNInstances should have comment or be unexported (golint)
    • Line 745: warning: exported method ConfigSvc.AddSecurityDomain should have comment or be unexported (golint)
    • Line 758: warning: exported method ConfigSvc.DeleteSecurityDomain should have comment or be unexported (golint)
    • Line 774: warning: exported method ConfigSvc.UpdateSecurityDomain should have comment or be unexported (golint)
    • Line 799: warning: exported method ConfigSvc.GetSecurityDomain should have comment or be unexported (golint)
    • Line 816: warning: exported method ConfigSvc.ListSecurityDomains should have comment or be unexported (golint)
    • Dragonfly2/pkg/idgen/task_id.go
    • Line 29: warning: exported const TwinsASuffix should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: comment on exported function TaskID should be of the form "TaskID ..." (golint)
    • Line 57: warning: comment on exported function TwinsTaskID should be of the form "TwinsTaskID ..." (golint)
    • Dragonfly2/client/daemon/peer/piece_manager.go
    • Line 42: warning: exported type PieceManager should have comment or be unexported (golint)
    • Line 58: warning: exported function NewPieceManager should have comment or be unexported (golint)
    • Line 80: warning: exported function WithPieceDownloader should have comment or be unexported (golint)
    • Line 86: warning: exported function WithCalculateDigest should have comment or be unexported (golint)
    • Dragonfly2/pkg/util/fileutils/file_lock.go
    • Line 39: warning: exported function NewFileLock should have comment or be unexported (golint)
    • Line 50: warning: exported method FileLock.Lock should have comment or be unexported (golint)
    • Line 62: warning: exported method FileLock.TryLock should have comment or be unexported (golint)
    • Line 70: warning: exported method FileLock.Unlock should have comment or be unexported (golint)
    • Dragonfly2/client/daemon/storage/metadata.go
    • Line 38: warning: exported type PeerTaskMetaData should have comment or be unexported (golint)
    • Line 43: warning: exported type PieceMetaData should have comment or be unexported (golint)
    • Line 51: warning: exported type CommonTaskRequest should have comment or be unexported (golint)
    • Line 57: warning: exported type RegisterTaskRequest should have comment or be unexported (golint)
    • Line 64: warning: exported type WritePieceRequest should have comment or be unexported (golint)
    • Line 71: warning: exported type StoreRequest should have comment or be unexported (golint)
    • Line 77: warning: exported type ReadPieceRequest should have comment or be unexported (golint)
    • Line 82: warning: exported type UpdateTaskRequest should have comment or be unexported (golint)
    • Dragonfly2/pkg/rpc/dfdaemon/client/client.go
    • Line 35: warning: exported function GetClientByAddr should have comment or be unexported (golint)
    • Line 51: warning: exported function GetElasticClientByAdders should have comment or be unexported (golint)
    • Line 67: warning: comment on exported type DaemonClient should be of the form "DaemonClient ..." (with optional leading article) (golint)
    • Dragonfly2/client/daemon/peer/piece_downloader.go
    • Line 35: warning: exported type DownloadPieceRequest should have comment or be unexported (golint)
    • Line 43: warning: exported type PieceDownloader should have comment or be unexported (golint)
    • Line 66: warning: exported function NewPieceDownloader should have comment or be unexported (golint)
    • Line 83: warning: exported function WithTransport should have comment or be unexported (golint)
    • Dragonfly2/pkg/dferrors/error.go
    • Line 36: warning: exported function IsEndOfStream should have comment or be unexported (golint)
    • Line 40: warning: exported type DfError should have comment or be unexported (golint)
    • Line 49: warning: exported function New should have comment or be unexported (golint)
    • Line 56: warning: exported function Newf should have comment or be unexported (golint)
    • Line 63: warning: exported function CheckError should have comment or be unexported (golint)
    • Dragonfly2/client/daemon/peer/peertask_file.go
    • Line 38: warning: exported type FilePeerTaskRequest should have comment or be unexported (golint)
    • Line 57: warning: exported type ProgressState should have comment or be unexported (golint)
    • Line 63: warning: exported type FilePeerTaskProgress should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/daemon/mgr/task/manager.go
    • Line 72: warning: exported method Manager.Register should have comment or be unexported (golint)
    • Line 161: warning: exported method Manager.Get should have comment or be unexported (golint)
    • Line 165: warning: exported method Manager.GetAccessTime should have comment or be unexported (golint)
    • Line 169: warning: exported method Manager.Delete should have comment or be unexported (golint)
    • Line 177: warning: exported method Manager.GetPieces should have comment or be unexported (golint)
    • Line 189: warning: exported method Manager.GC should have comment or be unexported (golint)
    • Dragonfly2/pkg/rpc/server.go
    • Line 44: warning: exported type RegisterFunc should have comment or be unexported (golint)
    • Line 53: warning: exported function SetRegister should have comment or be unexported (golint)
    • Line 88: warning: exported function GetTCPServerPort should have comment or be unexported (golint)
    • Line 96: warning: comment on exported function StartTCPServer should be of the form "StartTCPServer ..." (golint)
    • Line 118: warning: exported function StartUnixServer should have comment or be unexported (golint)
    • Line 165: warning: exported function StopServer should have comment or be unexported (golint)
    • Dragonfly2/client/daemon/transport/transport.go
    • Line 66: warning: comment on exported function WithPeerHost should be of the form "WithPeerHost ..." (golint)
    • Line 74: warning: comment on exported function WithPeerTaskManager should be of the form "WithPeerTaskManager ..." (golint)
    • Line 106: warning: comment on exported function WithDefaultBiz should be of the form "WithDefaultBiz ..." (golint)
    • Dragonfly2/pkg/rpc/scheduler/client/client.go
    • Line 41: warning: exported function GetClientByAddr should have comment or be unexported (golint)
    • Line 55: warning: exported function GetSchedulerByConfigServer should have comment or be unexported (golint)
    • Line 94: warning: comment on exported type SchedulerClient should be of the form "SchedulerClient ..." (with optional leading article) (golint)
    • Dragonfly2/scheduler/scheduler/scheduler.go
    • Line 26: warning: exported type Scheduler should have comment or be unexported (golint)
    • Line 34: warning: exported function New should have comment or be unexported (golint)
    • Line 47: warning: comment on exported method Scheduler.ScheduleChildren should be of the form "ScheduleChildren ..." (golint)
    • Line 90: warning: comment on exported method Scheduler.ScheduleParent should be of the form "ScheduleParent ..." (golint)
    • Line 134: warning: exported method Scheduler.ScheduleBadNode should have comment or be unexported (golint)
    • Line 164: warning: exported method Scheduler.ScheduleLeaveNode should have comment or be unexported (golint)
    • Line 183: warning: exported method Scheduler.ScheduleAdjustParentNode should have comment or be unexported (golint)
    • Line 193: warning: exported method Scheduler.ScheduleDone should have comment or be unexported (golint)
    • Line 207: warning: exported method Scheduler.NeedAdjustParent should have comment or be unexported (golint)
    • Line 211: warning: exported method Scheduler.IsNodeBad should have comment or be unexported (golint)
    • Dragonfly2/client/daemon/gc/gc_manager.go
    • Line 25: warning: exported type GC should have comment or be unexported (golint)
    • Line 29: warning: exported type Manager should have comment or be unexported (golint)
    • Line 41: warning: exported function Register should have comment or be unexported (golint)
    • Line 45: warning: exported function NewManager should have comment or be unexported (golint)
    • Dragonfly2/pkg/dflog/logcore/logcore.go
    • Line 33: warning: exported const CoreLogFileName should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported function CreateLogger should have comment or be unexported (golint)
    • Line 91: warning: exported function SetCoreLevel should have comment or be unexported (golint)
    • Line 95: warning: exported function SetGrpcLevel should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/server/server.go
    • Line 52: warning: exported type Server should have comment or be unexported (golint)
    • Line 121: warning: exported method Server.Serve should have comment or be unexported (golint)
    • Line 148: warning: exported method Server.Stop should have comment or be unexported (golint)
    • Dragonfly2/scheduler/metrics/task_statistic.go
    • Line 24: warning: exported type TaskStatistic should have comment or be unexported (golint)
    • Line 33: warning: exported type StatisticInfo should have comment or be unexported (golint)
    • Line 41: warning: exported method TaskStatistic.SetStartTime should have comment or be unexported (golint)
    • Line 47: warning: exported method TaskStatistic.SetEndTime should have comment or be unexported (golint)
    • Line 53: warning: exported method TaskStatistic.AddPeerTaskStart should have comment or be unexported (golint)
    • Line 59: warning: exported method TaskStatistic.AddPeerTaskDown should have comment or be unexported (golint)
    • Line 65: warning: exported method TaskStatistic.GetStatistic should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/source/source_client.go
    • Line 25: warning: exported function Register should have comment or be unexported (golint)
    • Line 29: warning: exported function NewSourceClient should have comment or be unexported (golint)
    • Line 35: warning: comment on exported type ResourceClient should be of the form "ResourceClient ..." (with optional leading article) (golint)
    • Line 51: warning: exported type ResourceClientAdaptor should have comment or be unexported (golint)
    • Line 55: warning: exported method ResourceClientAdaptor.GetContentLength should have comment or be unexported (golint)
    • Line 63: warning: exported method ResourceClientAdaptor.IsSupportRange should have comment or be unexported (golint)
    • Line 71: warning: exported method ResourceClientAdaptor.IsExpired should have comment or be unexported (golint)
    • Line 79: warning: exported method ResourceClientAdaptor.Download should have comment or be unexported (golint)
    • Dragonfly2/client/daemon/upload/upload_manager.go
    • Line 36: warning: exported type Manager should have comment or be unexported (golint)
    • Line 48: warning: exported const PeerDownloadHTTPPathPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported function NewUploadManager should have comment or be unexported (golint)
    • Dragonfly2/pkg/synclock/key_locker.go
    • Line 35: warning: exported function NewLockerPool should have comment or be unexported (golint)
    • Line 46: warning: exported function Lock should have comment or be unexported (golint)
    • Line 50: warning: exported function UnLock should have comment or be unexported (golint)
    • Line 54: warning: exported method LockerPool.Lock should have comment or be unexported (golint)
    • Line 67: warning: exported method LockerPool.UnLock should have comment or be unexported (golint)
    • Dragonfly2/pkg/rpc/client.go
    • Line 48: warning: exported type Closer should have comment or be unexported (golint)
    • Line 52: warning: comment on exported type ConnStatus should be of the form "ConnStatus ..." (with optional leading article) (golint)
    • Line 55: warning: exported type Connection should have comment or be unexported (golint)
    • Line 103: warning: exported type ConnOption should have comment or be unexported (golint)
    • Line 121: warning: exported function WithConnExpireTime should have comment or be unexported (golint)
    • Line 127: warning: exported function WithDialOption should have comment or be unexported (golint)
    • Line 133: warning: exported function WithGcConnTimeout should have comment or be unexported (golint)
    • Line 139: warning: exported function WithGcConnInterval should have comment or be unexported (golint)
    • Line 145: warning: exported function WithDialTimeout should have comment or be unexported (golint)
    • Line 151: warning: exported function NewConnection should have comment or be unexported (golint)
    • Line 167: warning: exported method Connection.CorrectKey2NodeRelation should have comment or be unexported (golint)
    • Line 179: warning: exported method Connection.UpdateAccessNodeMapByHashKey should have comment or be unexported (golint)
    • Line 194: warning: exported method Connection.UpdateAccessNodeMapByServerNode should have comment or be unexported (golint)
    • Line 198: warning: exported method Connection.AddServerNodes should have comment or be unexported (golint)
    • Line 270: warning: comment on exported method Connection.GetServerNode should be of the form "GetServerNode ..." (golint)
    • Line 280: warning: exported method Connection.GetClientConnByTarget should have comment or be unexported (golint)
    • Line 381: warning: exported method Connection.Close should have comment or be unexported (golint)
    • Line 411: warning: exported method Connection.UpdateState should have comment or be unexported (golint)
    • Dragonfly2/scheduler/service/worker/client.go
    • Line 31: warning: exported type Client should have comment or be unexported (golint)
    • Line 38: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 47: warning: exported method Client.Serve should have comment or be unexported (golint)
    • Line 91: warning: exported method Client.Send should have comment or be unexported (golint)
    • Line 95: warning: exported method Client.Recv should have comment or be unexported (golint)
    • Line 99: warning: exported method Client.Close should have comment or be unexported (golint)
    • Line 103: warning: exported method Client.IsClosed should have comment or be unexported (golint)
    • Dragonfly2/pkg/cache/cache.go
    • Line 30: warning: exported type Item should have comment or be unexported (golint)
    • Line 35: warning: comment on exported method Item.Expired should be of the form "Expired ..." (golint)
    • Line 44: warning: comment on exported const NoExpiration should be of the form "NoExpiration ..." (golint)
    • Line 47: warning: comment on exported const DefaultExpiration should be of the form "DefaultExpiration ..." (golint)
    • Line 52: warning: comment on exported const NoCleanup should be of the form "NoCleanup ..." (golint)
    • Line 56: warning: exported type Cache should have comment or be unexported (golint)
    • Line 442: warning: comment on exported function New should be of the form "New ..." (golint)
    • Dragonfly2/pkg/util/digestutils/digest.go
    • Line 31: warning: exported function Sha256 should have comment or be unexported (golint)
    • Line 46: warning: exported function Md5Reader should have comment or be unexported (golint)
    • Line 55: warning: exported function Md5Bytes should have comment or be unexported (golint)
    • Line 61: warning: exported function Md5File should have comment or be unexported (golint)
    • Line 85: warning: exported function ToHashString should have comment or be unexported (golint)
    • Dragonfly2/manager/apis/v2/types/schema.go
    • Line 3: warning: exported type SchedulerCluster should have comment or be unexported (golint)
    • Line 14: warning: exported type SchedulerClusterURI should have comment or be unexported (golint)
    • Line 18: warning: exported type ListSchedulerClustersResponse should have comment or be unexported (golint)
    • Line 22: warning: exported type SchedulerInstance should have comment or be unexported (golint)
    • Line 39: warning: exported type ListSchedulerInstancesResponse should have comment or be unexported (golint)
    • Line 43: warning: exported type SchedulerInstanceURI should have comment or be unexported (golint)
    • Line 47: warning: exported type CDNCluster should have comment or be unexported (golint)
    • Line 57: warning: exported type ListCDNClustersResponse should have comment or be unexported (golint)
    • Line 61: warning: exported type CDNClusterURI should have comment or be unexported (golint)
    • Line 65: warning: exported type CDNInstance should have comment or be unexported (golint)
    • Line 81: warning: exported type ListCDNInstancesResponse should have comment or be unexported (golint)
    • Line 85: warning: exported type CDNInstanceURI should have comment or be unexported (golint)
    • Line 89: warning: exported type SecurityDomain should have comment or be unexported (golint)
    • Line 100: warning: exported type ListSecurityDomainsResponse should have comment or be unexported (golint)
    • Line 104: warning: exported type ListQuery should have comment or be unexported (golint)
    • Line 109: warning: exported type TaskURI should have comment or be unexported (golint)
    • Line 114: warning: exported type WarmupTask should have comment or be unexported (golint)
    • Dragonfly2/scheduler/types/task.go
    • Line 29: warning: exported type Task should have comment or be unexported (golint)
    • Line 53: warning: exported function CopyTask should have comment or be unexported (golint)
    • Line 68: warning: exported method Task.GetPiece should have comment or be unexported (golint)
    • Line 74: warning: exported method Task.GetOrCreatePiece should have comment or be unexported (golint)
    • Line 89: warning: exported method Task.AddPiece should have comment or be unexported (golint)
    • Dragonfly2/scheduler/service/worker/woker.go
    • Line 34: warning: exported type JobType should have comment or be unexported (golint)
    • Line 36: warning: exported type Worker should have comment or be unexported (golint)
    • Line 46: warning: exported function NewWorker should have comment or be unexported (golint)
    • Line 57: warning: exported method Worker.Serve should have comment or be unexported (golint)
    • Line 62: warning: exported method Worker.Stop should have comment or be unexported (golint)
    • Line 70: warning: exported method Worker.ReceiveUpdatePieceResult should have comment or be unexported (golint)
    • Line 91: warning: exported method Worker.UpdatePieceResult should have comment or be unexported (golint)
    • Line 157: warning: exported method Worker.ReceiveJob should have comment or be unexported (golint)
    • Dragonfly2/scheduler/config/dynconfig.go
    • Line 32: warning: exported var SchedulerDynconfigPath should have comment or be unexported (golint)
    • Line 40: warning: exported type DynconfigInterface should have comment or be unexported (golint)
    • Line 60: warning: exported type Observer should have comment or be unexported (golint)
    • Line 71: warning: exported function NewDynconfig should have comment or be unexported (golint)
    • Line 147: warning: exported function NewManagerClient should have comment or be unexported (golint)
    • Dragonfly2/scheduler/manager/peer_task.go
    • Line 38: warning: exported const PeerGoneTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: exported type PeerTask should have comment or be unexported (golint)
    • Line 80: warning: exported method PeerTask.Add should have comment or be unexported (golint)
    • Line 102: warning: exported method PeerTask.AddFake should have comment or be unexported (golint)
    • Line 114: warning: exported method PeerTask.Delete should have comment or be unexported (golint)
    • Line 132: warning: exported method PeerTask.Get should have comment or be unexported (golint)
    • Line 141: warning: exported method PeerTask.AddTask should have comment or be unexported (golint)
    • Line 145: warning: exported method PeerTask.DeleteTask should have comment or be unexported (golint)
    • Line 165: warning: exported method PeerTask.Update should have comment or be unexported (golint)
    • Line 192: warning: exported method PeerTask.Walker should have comment or be unexported (golint)
    • Line 210: warning: exported method PeerTask.WalkerReverse should have comment or be unexported (golint)
    • Line 228: warning: exported method PeerTask.ClearPeerTask should have comment or be unexported (golint)
    • Line 238: warning: exported method PeerTask.GetGCDelayTime should have comment or be unexported (golint)
    • Line 242: warning: exported method PeerTask.SetGCDelayTime should have comment or be unexported (golint)
    • Line 347: warning: exported method PeerTask.RefreshDownloadMonitor should have comment or be unexported (golint)
    • Line 363: warning: exported method PeerTask.CDNCallback should have comment or be unexported (golint)
    • Line 370: warning: exported method PeerTask.SetDownloadingMonitorCallBack should have comment or be unexported (golint)
    • Dragonfly2/manager/server/service/manager_server.go
    • Line 20: warning: exported type ManagerServer should have comment or be unexported (golint)
    • Line 27: warning: exported function NewManagerServer should have comment or be unexported (golint)
    • Line 57: warning: exported method ManagerServer.GetSchedulers should have comment or be unexported (golint)
    • Line 98: warning: exported method ManagerServer.KeepAlive should have comment or be unexported (golint)
    • Line 103: warning: exported method ManagerServer.GetClusterConfig should have comment or be unexported (golint)
    • Line 205: warning: exported method ManagerServer.AddSchedulerCluster should have comment or be unexported (golint)
    • Line 209: warning: exported method ManagerServer.DeleteSchedulerCluster should have comment or be unexported (golint)
    • Line 213: warning: exported method ManagerServer.UpdateSchedulerCluster should have comment or be unexported (golint)
    • Line 217: warning: exported method ManagerServer.GetSchedulerCluster should have comment or be unexported (golint)
    • Line 221: warning: exported method ManagerServer.ListSchedulerClusters should have comment or be unexported (golint)
    • Line 225: warning: exported method ManagerServer.AddSchedulerInstance should have comment or be unexported (golint)
    • Line 229: warning: exported method ManagerServer.DeleteSchedulerInstance should have comment or be unexported (golint)
    • Line 233: warning: exported method ManagerServer.UpdateSchedulerInstance should have comment or be unexported (golint)
    • Line 237: warning: exported method ManagerServer.GetSchedulerInstance should have comment or be unexported (golint)
    • Line 241: warning: exported method ManagerServer.ListSchedulerInstances should have comment or be unexported (golint)
    • Line 245: warning: exported method ManagerServer.AddCDNCluster should have comment or be unexported (golint)
    • Line 249: warning: exported method ManagerServer.DeleteCDNCluster should have comment or be unexported (golint)
    • Line 253: warning: exported method ManagerServer.UpdateCDNCluster should have comment or be unexported (golint)
    • Line 257: warning: exported method ManagerServer.GetCDNCluster should have comment or be unexported (golint)
    • Line 261: warning: exported method ManagerServer.ListCDNClusters should have comment or be unexported (golint)
    • Line 265: warning: exported method ManagerServer.AddCDNInstance should have comment or be unexported (golint)
    • Line 269: warning: exported method ManagerServer.DeleteCDNInstance should have comment or be unexported (golint)
    • Line 273: warning: exported method ManagerServer.UpdateCDNInstance should have comment or be unexported (golint)
    • Line 277: warning: exported method ManagerServer.GetCDNInstance should have comment or be unexported (golint)
    • Line 281: warning: exported method ManagerServer.ListCDNInstances should have comment or be unexported (golint)
    • Line 285: warning: exported method ManagerServer.AddSecurityDomain should have comment or be unexported (golint)
    • Line 289: warning: exported method ManagerServer.DeleteSecurityDomain should have comment or be unexported (golint)
    • Line 293: warning: exported method ManagerServer.UpdateSecurityDomain should have comment or be unexported (golint)
    • Line 297: warning: exported method ManagerServer.GetSecurityDomain should have comment or be unexported (golint)
    • Line 301: warning: exported method ManagerServer.ListSecurityDomains should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/daemon/mgr/cdn/storage/path_util.go
    • Line 31: warning: exported const UploadHome should have comment (or a comment on this block) or be unexported (golint)
    • Line 50: warning: exported function GetDownloadRaw should have comment or be unexported (golint)
    • Line 57: warning: exported function GetUploadRaw should have comment or be unexported (golint)
    • Line 64: warning: exported function GetTaskMetaDataRaw should have comment or be unexported (golint)
    • Line 72: warning: exported function GetPieceMetaDataRaw should have comment or be unexported (golint)
    • Line 79: warning: exported function GetAppendPieceMetaDataRaw should have comment or be unexported (golint)
    • Line 87: warning: exported function GetParentRaw should have comment or be unexported (golint)
    • Line 94: warning: exported function GetDownloadHomeRaw should have comment or be unexported (golint)
    • Line 100: warning: exported function GetUploadHomeRaw should have comment or be unexported (golint)
    • Dragonfly2/pkg/basic/dfnet/type.go
    • Line 26: warning: exported type NetworkType should have comment or be unexported (golint)
    • Line 29: warning: exported const TCP should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported type NetAddr should have comment or be unexported (golint)
    • Line 39: warning: exported method NetAddr.GetEndpoint should have comment or be unexported (golint)
    • Line 52: warning: exported method NetAddr.UnmarshalJSON should have comment or be unexported (golint)
    • Line 73: warning: exported method NetAddr.UnmarshalYAML should have comment or be unexported (golint)
    • Line 129: warning: exported function Convert2NetAddr should have comment or be unexported (golint)
    • Dragonfly2/scheduler/types/peer_task.go
    • Line 31: warning: exported type PeerTaskStatus should have comment or be unexported (golint)
    • Line 34: warning: exported const PeerTaskStatusHealth should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported type PeerTask should have comment or be unexported (golint)
    • Line 74: warning: exported type PeerEdge should have comment or be unexported (golint)
    • Line 81: warning: exported method PeerEdge.AddCost should have comment or be unexported (golint)
    • Line 91: warning: exported function NewPeerTask should have comment or be unexported (golint)
    • Line 114: warning: exported method PeerTask.AddParent should have comment or be unexported (golint)
    • Line 146: warning: exported method PeerTask.GetStartTime should have comment or be unexported (golint)
    • Line 150: warning: exported method PeerTask.GetParent should have comment or be unexported (golint)
    • Line 156: warning: exported method PeerTask.GetCost should have comment or be unexported (golint)
    • Line 167: warning: exported method PeerTask.GetChildren should have comment or be unexported (golint)
    • Line 177: warning: exported method PeerTask.AddConcurrency should have comment or be unexported (golint)
    • Line 196: warning: exported method PeerTask.DeleteParent should have comment or be unexported (golint)
    • Line 226: warning: exported method PeerTask.GetFreeLoad should have comment or be unexported (golint)
    • Line 233: warning: exported method PeerTask.Touch should have comment or be unexported (golint)
    • Line 238: warning: exported method PeerTask.GetFinishedNum should have comment or be unexported (golint)
    • Line 244: warning: exported method PeerTask.AddPieceStatus should have comment or be unexported (golint)
    • Line 266: warning: exported method PeerTask.IsDown should have comment or be unexported (golint)
    • Line 270: warning: exported method PeerTask.SetDown should have comment or be unexported (golint)
    • Line 275: warning: exported method PeerTask.SetUp should have comment or be unexported (golint)
    • Line 280: warning: exported method PeerTask.SetStatus should have comment or be unexported (golint)
    • Line 294: warning: exported method PeerTask.SetClient should have comment or be unexported (golint)
    • Line 298: warning: exported method PeerTask.GetSendPkg should have comment or be unexported (golint)
    • Line 322: warning: exported method PeerTask.Send should have comment or be unexported (golint)
    • Line 336: warning: exported method PeerTask.SendError should have comment or be unexported (golint)
    • Line 357: warning: exported method PeerTask.GetDiffPieceNum should have comment or be unexported (golint)
    • Line 367: warning: exported method PeerTask.GetDeep should have comment or be unexported (golint)
    • Line 383: warning: exported method PeerTask.GetRoot should have comment or be unexported (golint)
    • Line 397: warning: exported method PeerTask.IsAncestor should have comment or be unexported (golint)
    • Line 416: warning: exported method PeerTask.GetSubTreeNodesNum should have comment or be unexported (golint)
    • Line 422: warning: exported method PeerTask.GetNodeStatus should have comment or be unexported (golint)
    • Line 428: warning: exported method PeerTask.GetJobData should have comment or be unexported (golint)
    • Line 434: warning: exported method PeerTask.SetNodeStatus should have comment or be unexported (golint)
    • Line 445: warning: exported method PeerTask.IsWaiting should have comment or be unexported (golint)
    • Line 455: warning: exported method PeerTask.GetLastActiveTime should have comment or be unexported (golint)
    • Line 461: warning: exported method PeerTask.GetSortKeys should have comment or be unexported (golint)
    • Dragonfly2/pkg/dflog/logger.go
    • Line 27: warning: exported var CoreLogger should have comment or be unexported (golint)
    • Line 52: warning: exported function SetCoreLogger should have comment or be unexported (golint)
    • Line 56: warning: exported function SetGcLogger should have comment or be unexported (golint)
    • Line 60: warning: exported function SetKeepAliveLogger should have comment or be unexported (golint)
    • Line 64: warning: exported function SetStatPeerLogger should have comment or be unexported (golint)
    • Line 68: warning: exported function SetStatSeedLogger should have comment or be unexported (golint)
    • Line 72: warning: exported function SetDownloadLogger should have comment or be unexported (golint)
    • Line 76: warning: exported function SetGrpcLogger should have comment or be unexported (golint)
    • Line 81: warning: exported type SugaredLoggerOnWith should have comment or be unexported (golint)
    • Line 85: warning: exported function With should have comment or be unexported (golint)
    • Line 91: warning: exported function WithTaskID should have comment or be unexported (golint)
    • Line 97: warning: exported function WithPeerID should have comment or be unexported (golint)
    • Line 103: warning: exported method SugaredLoggerOnWith.Infof should have comment or be unexported (golint)
    • Line 107: warning: exported method SugaredLoggerOnWith.Info should have comment or be unexported (golint)
    • Line 111: warning: exported method SugaredLoggerOnWith.Warnf should have comment or be unexported (golint)
    • Line 115: warning: exported method SugaredLoggerOnWith.Errorf should have comment or be unexported (golint)
    • Line 123: warning: exported method SugaredLoggerOnWith.Debugf should have comment or be unexported (golint)
    • Line 127: warning: exported function Infof should have comment or be unexported (golint)
    • Line 131: warning: exported function Info should have comment or be unexported (golint)
    • Line 135: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 139: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 143: warning: exported function Error should have comment or be unexported (golint)
    • Line 147: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 151: warning: exported function Fatalf should have comment or be unexported (golint)
    • Line 155: warning: exported function Fatal should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/config/constants.go
    • Line 26: warning: exported const CDNWriterRoutineLimit should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported const DefaultStoragePattern should have comment (or a comment on this block) or be unexported (golint)
    • Dragonfly2/manager/config/config.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 17: warning: exported type ServerConfig should have comment or be unexported (golint)
    • Line 22: warning: exported type ConfigureConfig should have comment or be unexported (golint)
    • Line 26: warning: exported type MysqlConfig should have comment or be unexported (golint)
    • Line 34: warning: exported type OssConfig should have comment or be unexported (golint)
    • Line 37: warning: exported type StoreConfig should have comment or be unexported (golint)
    • Line 44: warning: exported type HostService should have comment or be unexported (golint)
    • Line 47: warning: exported type SkylineService should have comment or be unexported (golint)
    • Line 54: warning: exported function New should have comment or be unexported (golint)
    • Line 80: warning: exported method StoreConfig.Valid should have comment or be unexported (golint)
    • Line 116: warning: exported method Config.Valid should have comment or be unexported (golint)
    • Dragonfly2/client/config/peerhost.go
    • Line 44: warning: exported type DaemonConfig should have comment or be unexported (golint)
    • Line 45: warning: exported type PeerHostOption should have comment or be unexported (golint)
    • Line 67: warning: exported function NewDaemonConfig should have comment or be unexported (golint)
    • Line 71: warning: exported method PeerHostOption.Load should have comment or be unexported (golint)
    • Line 95: warning: exported method PeerHostOption.Convert should have comment or be unexported (golint)
    • Line 107: warning: exported method PeerHostOption.Validate should have comment or be unexported (golint)
    • Line 118: warning: exported type SchedulerOption should have comment or be unexported (golint)
    • Line 126: warning: exported type HostOption should have comment or be unexported (golint)
    • Line 141: warning: exported type DownloadOption should have comment or be unexported (golint)
    • Line 149: warning: exported type ProxyOption should have comment or be unexported (golint)
    • Line 161: warning: exported method ProxyOption.UnmarshalJSON should have comment or be unexported (golint)
    • Line 187: warning: exported method ProxyOption.UnmarshalYAML should have comment or be unexported (golint)
    • Line 261: warning: exported type UploadOption should have comment or be unexported (golint)
    • Line 266: warning: exported type ListenOption should have comment or be unexported (golint)
    • Line 272: warning: exported type TCPListenOption should have comment or be unexported (golint)
    • Line 286: warning: exported type TCPListenPortRange should have comment or be unexported (golint)
    • Line 291: warning: exported method TCPListenPortRange.UnmarshalJSON should have comment or be unexported (golint)
    • Line 299: warning: exported method TCPListenPortRange.UnmarshalYAML should have comment or be unexported (golint)
    • Line 365: warning: exported type UnixListenOption should have comment or be unexported (golint)
    • Line 369: warning: exported type SecurityOption should have comment or be unexported (golint)
    • Line 378: warning: exported type StorageOption should have comment or be unexported (golint)
    • Line 389: warning: exported type StoreStrategy should have comment or be unexported (golint)
    • Line 391: warning: exported type FileString should have comment or be unexported (golint)
    • Line 393: warning: exported method FileString.UnmarshalJSON should have comment or be unexported (golint)
    • Line 409: warning: exported method FileString.UnmarshalYAML should have comment or be unexported (golint)
    • Line 435: warning: exported type TLSConfig should have comment or be unexported (golint)
    • Line 439: warning: exported method TLSConfig.UnmarshalJSON should have comment or be unexported (golint)
    • Line 600: warning: exported function NewProxy should have comment or be unexported (golint)
    • Line 684: warning: exported type WhiteList should have comment or be unexported (golint)
    • Line 690: warning: exported type BasicAuth should have comment or be unexported (golint)
    • Dragonfly2/pkg/util/mathutils/math_utils.go
    • Line 24: warning: exported function MaxInt32 should have comment or be unexported (golint)
    • Line 32: warning: exported function MinInt32 should have comment or be unexported (golint)
    • Line 40: warning: exported function MaxInt64 should have comment or be unexported (golint)
    • Line 48: warning: exported function MinInt64 should have comment or be unexported (golint)
    • Line 56: warning: exported function IsNatural should have comment or be unexported (golint)
    • Line 64: warning: exported function IsInteger should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/types/seed_piece_info.go
    • Line 21: warning: comment on exported type SeedPiece should be of the form "SeedPiece ..." (with optional leading article) (golint)
    • Line 31: warning: exported type ItemType should have comment or be unexported (golint)
    • Line 33: warning: exported type PieceFormat should have comment or be unexported (golint)
    • Line 36: warning: exported const PlainUnspecified should have comment (or a comment on this block) or be unexported (golint)
    • Dragonfly2/scheduler/service/worker/worker_group.go
    • Line 30: warning: exported type IWorker should have comment or be unexported (golint)
    • Line 37: warning: exported type Group should have comment or be unexported (golint)
    • Line 49: warning: exported function NewGroup should have comment or be unexported (golint)
    • Line 59: warning: exported method Group.Serve should have comment or be unexported (golint)
    • Line 88: warning: exported method Group.Stop should have comment or be unexported (golint)
    • Line 95: warning: exported method Group.ReceiveJob should have comment or be unexported (golint)
    • Line 103: warning: exported method Group.ReceiveUpdatePieceResult should have comment or be unexported (golint)
    • Dragonfly2/pkg/rpc/base/common/common.go
    • Line 28: warning: exported var EndOfPiece should have comment or be unexported (golint)
    • Line 29: warning: exported var ZeroOfPiece should have comment or be unexported (golint)
    • Line 34: warning: exported function NewGrpcDfError should have comment or be unexported (golint)
    • Line 50: warning: exported function NewResWithErr should have comment or be unexported (golint)
    • Dragonfly2/manager/store/orm/cdn_instance.go
    • Line 15: warning: exported type CDNInstanceTable should have comment or be unexported (golint)
    • Line 33: warning: exported type CDNInstanceStore should have comment or be unexported (golint)
    • Line 39: warning: exported function NewCDNInstanceStore should have comment or be unexported (golint)
    • Line 54: warning: exported function CDNInstanceToTable should have comment or be unexported (golint)
    • Line 70: warning: exported function CDNInstanceToSchema should have comment or be unexported (golint)
    • Line 101: warning: exported method CDNInstanceStore.Add should have comment or be unexported (golint)
    • Line 116: warning: exported method CDNInstanceStore.Delete should have comment or be unexported (golint)
    • Line 139: warning: exported method CDNInstanceStore.Update should have comment or be unexported (golint)
    • Line 163: warning: exported method CDNInstanceStore.Get should have comment or be unexported (golint)
    • Line 175: warning: exported method CDNInstanceStore.List should have comment or be unexported (golint)
    • Dragonfly2/client/config/dfget.go
    • Line 42: warning: exported type DfgetConfig should have comment or be unexported (golint)
    • Line 112: warning: exported function NewDfgetConfig should have comment or be unexported (golint)
    • Line 116: warning: exported method ClientOption.Validate should have comment or be unexported (golint)
    • Line 132: warning: exported method ClientOption.Convert should have comment or be unexported (golint)
    • Dragonfly2/client/config/flags.go
    • Line 35: warning: exported type NetAddrsValue should have comment or be unexported (golint)
    • Line 40: warning: exported function NewNetAddrsValue should have comment or be unexported (golint)
    • Line 56: warning: exported method NetAddrsValue.Set should have comment or be unexported (golint)
    • Line 79: warning: exported method NetAddrsValue.Type should have comment or be unexported (golint)
    • Line 83: warning: exported type RateLimitValue should have comment or be unexported (golint)
    • Line 87: warning: exported function NewLimitRateValue should have comment or be unexported (golint)
    • Line 95: warning: exported method RateLimitValue.Set should have comment or be unexported (golint)
    • Line 104: warning: exported method RateLimitValue.Type should have comment or be unexported (golint)
    • Line 112: warning: exported function NewDurationValue should have comment or be unexported (golint)
    • Line 116: warning: exported method DurationValue.Set should have comment or be unexported (golint)
    • Line 132: warning: exported method DurationValue.Type should have comment or be unexported (golint)
    • Dragonfly2/scheduler/types/host.go
    • Line 26: warning: exported type HostType should have comment or be unexported (golint)
    • Line 29: warning: exported const HostTypePeer should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported type Host should have comment or be unexported (golint)
    • Line 48: warning: exported function Init should have comment or be unexported (golint)
    • Line 54: warning: exported method Host.AddPeerTask should have comment or be unexported (golint)
    • Line 58: warning: exported method Host.DeletePeerTask should have comment or be unexported (golint)
    • Line 65: warning: exported method Host.GetPeerTaskNum should have comment or be unexported (golint)
    • Line 76: warning: exported method Host.GetPeerTask should have comment or be unexported (golint)
    • Line 82: warning: exported method Host.SetTotalUploadLoad should have comment or be unexported (golint)
    • Line 88: warning: exported method Host.AddUploadLoad should have comment or be unexported (golint)
    • Line 95: warning: exported method Host.GetUploadLoad should have comment or be unexported (golint)
    • Line 101: warning: exported method Host.GetUploadLoadPercent should have comment or be unexported (golint)
    • Line 110: warning: exported method Host.GetFreeUploadLoad should have comment or be unexported (golint)
    • Line 116: warning: exported method Host.SetTotalDownloadLoad should have comment or be unexported (golint)
    • Line 122: warning: exported method Host.AddDownloadLoad should have comment or be unexported (golint)
    • Line 128: warning: exported method Host.GetDownloadLoad should have comment or be unexported (golint)
    • Line 134: warning: exported method Host.GetDownloadLoadPercent should have comment or be unexported (golint)
    • Line 143: warning: exported method Host.GetFreeDownloadLoad should have comment or be unexported (golint)
    • Dragonfly2/scheduler/service/service.go
    • Line 30: warning: exported type SchedulerService should have comment or be unexported (golint)
    • Line 39: warning: exported function NewSchedulerService should have comment or be unexported (golint)
    • Line 54: warning: exported method SchedulerService.GenerateTaskID should have comment or be unexported (golint)
    • Line 61: warning: exported method SchedulerService.GetTask should have comment or be unexported (golint)
    • Line 65: warning: exported method SchedulerService.AddTask should have comment or be unexported (golint)
    • Line 81: warning: exported method SchedulerService.ScheduleParent should have comment or be unexported (golint)
    • Line 86: warning: exported method SchedulerService.ScheduleChildren should have comment or be unexported (golint)
    • Line 90: warning: exported method SchedulerService.GetPeerTask should have comment or be unexported (golint)
    • Line 98: warning: exported method SchedulerService.AddPeerTask should have comment or be unexported (golint)
    • Line 104: warning: exported method SchedulerService.DeletePeerTask should have comment or be unexported (golint)
    • Line 118: warning: exported method SchedulerService.GetHost should have comment or be unexported (golint)
    • Line 126: warning: exported method SchedulerService.AddHost should have comment or be unexported (golint)
    • Dragonfly2/scheduler/service/worker/sender.go
    • Line 30: warning: exported type ISender should have comment or be unexported (golint)
    • Line 36: warning: exported type SenderGroup should have comment or be unexported (golint)
    • Line 44: warning: exported type Sender should have comment or be unexported (golint)
    • Line 50: warning: exported function NewSender should have comment or be unexported (golint)
    • Line 58: warning: exported method SenderGroup.Serve should have comment or be unexported (golint)
    • Line 72: warning: exported method SenderGroup.Stop should have comment or be unexported (golint)
    • Line 77: warning: exported method SenderGroup.Send should have comment or be unexported (golint)
    • Line 82: warning: exported method Sender.Send should have comment or be unexported (golint)
    • Line 86: warning: exported method Sender.Serve should have comment or be unexported (golint)
    • Dragonfly2/client/clientutil/types.go
    • Line 38: warning: exported method RateLimit.UnmarshalJSON should have comment or be unexported (golint)
    • Line 42: warning: exported method RateLimit.UnmarshalYAML should have comment or be unexported (golint)
    • Line 70: warning: exported type Duration should have comment or be unexported (golint)
    • Line 74: warning: exported method Duration.UnmarshalJSON should have comment or be unexported (golint)
    • Line 82: warning: exported method Duration.UnmarshalYAML should have comment or be unexported (golint)
    • Dragonfly2/scheduler/manager/cdn_manager.go
    • Line 43: warning: exported const TinyFileSize should have comment or be unexported (golint)
    • Line 45: warning: exported type CDNManager should have comment or be unexported (golint)
    • Line 112: warning: exported method CDNManager.OnNotify should have comment or be unexported (golint)
    • Line 120: warning: exported method CDNManager.TriggerTask should have comment or be unexported (golint)
    • Line 185: warning: exported method CDNManager.AddToCallback should have comment or be unexported (golint)
    • Line 208: warning: exported type CDNClient should have comment or be unexported (golint)
    • Line 213: warning: exported method CDNManager.Work should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/daemon/mgr/gc/manager.go
    • Line 35: warning: exported type Executor should have comment or be unexported (golint)
    • Line 39: warning: exported type ExecutorWrapper should have comment or be unexported (golint)
    • Line 49: warning: exported function Register should have comment or be unexported (golint)
    • Line 64: warning: exported method Manager.GCTask should have comment or be unexported (golint)
    • Dragonfly2/manager/host/manager.go
    • Line 9: warning: exported type Info should have comment or be unexported (golint)
    • Line 18: warning: exported function NewDefaultHostInfo should have comment or be unexported (golint)
    • Line 29: warning: exported method Info.IsDefault should have comment or be unexported (golint)
    • Line 33: warning: exported type Op should have comment or be unexported (golint)
    • Line 39: warning: exported type OpOption should have comment or be unexported (golint)
    • Line 41: warning: exported method Op.ApplyOpts should have comment or be unexported (golint)
    • Line 47: warning: exported function WithSn should have comment or be unexported (golint)
    • Line 53: warning: exported function WithIP should have comment or be unexported (golint)
    • Line 59: warning: exported function WithHostName should have comment or be unexported (golint)
    • Line 65: warning: exported type Manager should have comment or be unexported (golint)
    • Line 69: warning: exported function NewManager should have comment or be unexported (golint)
    • Dragonfly2/manager/server/server.go
    • Line 37: warning: exported type Server should have comment or be unexported (golint)
    • Line 44: warning: exported function New should have comment or be unexported (golint)
    • Line 65: warning: exported method Server.Serve should have comment or be unexported (golint)
    • Line 96: warning: exported method Server.Stop should have comment or be unexported (golint)
    • Dragonfly2/pkg/util/stringutils/string_utils.go
    • Line 25: warning: exported function SubString should have comment or be unexported (golint)
    • Line 35: warning: exported function IsBlank should have comment or be unexported (golint)
    • Line 45: warning: exported function IsEmpty should have comment or be unexported (golint)
    • Line 49: warning: exported function ContainsFold should have comment or be unexported (golint)
    • Line 59: warning: exported function Contains should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/cdnerrors/errors.go
    • Line 82: warning: exported function IsPieceCountNotEqual should have comment or be unexported (golint)
    • Line 86: warning: exported function IsFileLengthNotEqual should have comment or be unexported (golint)
    • Line 90: warning: exported function IsDownloadFail should have comment or be unexported (golint)
    • Line 94: warning: exported function IsResourceExpired should have comment or be unexported (golint)
    • Line 98: warning: exported function IsResourceNotSupportRangeRequest should have comment or be unexported (golint)
    • Line 102: warning: exported function IsPieceMd5NotMatch should have comment or be unexported (golint)
    • Line 106: warning: exported function IsDataNotFound should have comment or be unexported (golint)
    • Line 110: warning: exported function IsInvalidValue should have comment or be unexported (golint)
    • Line 114: warning: exported function IsConvertFailed should have comment or be unexported (golint)
    • Line 118: warning: exported function IsRangeNotSatisfiable should have comment or be unexported (golint)
    • Line 122: warning: exported function IsFileNotExist should have comment or be unexported (golint)
    • Dragonfly2/manager/store/orm/scheduler_instance.go
    • Line 15: warning: exported type SchedulerInstanceTable should have comment or be unexported (golint)
    • Line 34: warning: exported type SchedulerInstanceStore should have comment or be unexported (golint)
    • Line 40: warning: exported function NewSchedulerInstanceStore should have comment or be unexported (golint)
    • Line 55: warning: exported function SchedulerInstanceToTable should have comment or be unexported (golint)
    • Line 72: warning: exported function SchedulerInstanceToSchema should have comment or be unexported (golint)
    • Line 104: warning: exported method SchedulerInstanceStore.Add should have comment or be unexported (golint)
    • Line 120: warning: exported method SchedulerInstanceStore.Delete should have comment or be unexported (golint)
    • Line 144: warning: exported method SchedulerInstanceStore.Update should have comment or be unexported (golint)
    • Line 169: warning: exported method SchedulerInstanceStore.Get should have comment or be unexported (golint)
    • Line 181: warning: exported method SchedulerInstanceStore.List should have comment or be unexported (golint)
    • Dragonfly2/pkg/unit/byte.go
    • Line 31: warning: exported type Bytes should have comment or be unexported (golint)
    • Line 34: warning: exported const B should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported method Bytes.ToNumber should have comment or be unexported (golint)
    • Line 47: warning: exported function ToBytes should have comment or be unexported (golint)
    • Line 62: warning: exported method Bytes.Type should have comment or be unexported (golint)
    • Line 134: warning: exported method Bytes.MarshalYAML should have comment or be unexported (golint)
    • Line 139: warning: exported method Bytes.UnmarshalJSON should have comment or be unexported (golint)
    • Line 143: warning: exported method Bytes.UnmarshalYAML should have comment or be unexported (golint)
    • Dragonfly2/cdnsystem/storedriver/store.go
    • Line 77: warning: comment on exported method Store.GetTotalSpace should be of the form "GetTotalSpace ..." (golint)
    • Line 82: warning: comment on exported method Store.CreateBaseDir should be of the form "CreateBaseDir ..." (golint)
    • Line 87: warning: exported method Store.Exits should have comment or be unexported (golint)
    • Line 91: warning: exported method Store.GetTotalAndFreeSpace should have comment or be unexported (golint)
    • Line 160: warning: exported method Store.GetPath should have comment or be unexported (golint)
    • Line 164: warning: exported method Store.MoveFile should have comment or be unexported (golint)
    • Line 173: warning: exported method Store.GetHomePath should have comment or be unexported (golint)
    • Line 177: warning: exported method Store.GetGcConfig should have comment or be unexported (golint)
    • Dragonfly2/scheduler/config/config.go
    • Line 28: warning: exported type Config should have comment or be unexported (golint)
    • Line 39: warning: exported function New should have comment or be unexported (golint)
    • Line 43: warning: exported method Config.Validate should have comment or be unexported (golint)
    • Line 71: warning: exported type ManagerConfig should have comment or be unexported (golint)
    • Line 76: warning: exported type DynconfigOptions should have comment or be unexported (golint)
    • Line 93: warning: exported type SchedulerConfig should have comment or be unexported (golint)
    • Line 99: warning: exported type ServerConfig should have comment or be unexported (golint)
    • Line 104: warning: exported type SchedulerWorkerConfig should have comment or be unexported (golint)
    • Line 111: warning: exported type GCConfig should have comment or be unexported (golint)
    • Dragonfly2/client/config/constants.go
    • Line 49: warning: exported const DefaultPerPeerDownloadLimit should have comment (or a comment on this block) or be unexported (golint)
    • Line 75: warning: exported const SimpleLocalTaskStoreStrategy should have comment (or a comment on this block) or be unexported (golint)
    • Dragonfly2/cdnsystem/daemon/mgr/cdn/storage/storage_mgr.go
    • Line 42: warning: exported function Register should have comment or be unexported (golint)
    • Line 63: warning: exported type BuildOptions should have comment or be unexported (golint)
    • Line 66: warning: comment on exported type FileMetaData should be of the form "FileMetaData ..." (with optional leading article) (golint)
    • Line 86: warning: comment on exported type PieceMetaRecord should be of the form "PieceMetaRecord ..." (with optional leading article) (golint)
    • Line 101: warning: exported function ParsePieceMetaRecord should have comment or be unexported (golint)
    • Line 142: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 151: warning: exported type Manager should have comment or be unexported (golint)
    • Dragonfly2/scheduler/manager/task_manager.go
    • Line 30: warning: exported type TaskManager should have comment or be unexported (golint)
    • Line 58: warning: exported method TaskManager.Set should have comment or be unexported (golint)
    • Line 71: warning: exported method TaskManager.Add should have comment or be unexported (golint)
    • Line 82: warning: exported method TaskManager.Get should have comment or be unexported (golint)
    • Line 98: warning: exported method TaskManager.Delete should have comment or be unexported (golint)
    • Line 113: warning: exported method TaskManager.Touch should have comment or be unexported (golint)
    • Dragonfly2/manager/store/orm/scheduler_cluster.go
    • Line 15: warning: exported type SchedulerClusterTable should have comment or be unexported (golint)
    • Line 28: warning: exported type SchedulerClusterStore should have comment or be unexported (golint)
    • Line 34: warning: exported function NewSchedulerClusterStore should have comment or be unexported (golint)
    • Line 49: warning: exported function SchedulerClusterToTable should have comment or be unexported (golint)
    • Line 60: warning: exported function SchedulerClusterToSchema should have comment or be unexported (golint)
    • Line 86: warning: exported method SchedulerClusterStore.Add should have comment or be unexported (golint)
    • Line 101: warning: exported method SchedulerClusterStore.Delete should have comment or be unexported (golint)
    • Line 124: warning: exported method SchedulerClusterStore.Update should have comment or be unexported (golint)
    • Line 148: warning: exported method SchedulerClusterStore.Get should have comment or be unexported (golint)
    • Line 160: warning: exported method SchedulerClusterStore.List should have comment or be unexported (golint)
    • Dragonfly2/pkg/util/fileutils/file_utils.go
    • Line 63: warning: exported function Open should have comment or be unexported (golint)
    • Line 84: warning: exported function IsSymbolicLink should have comment or be unexported (golint)
    • Line 122: warning: exported function IsDir should have comment or be unexported (golint)
    • Line 131: warning: exported function IsRegular should have comment or be unexported (golint)
    • Line 140: warning: exported function IsEmptyDir should have comment or be unexported (golint)
    • Line 174: warning: comment on exported function GetTotalSpace should be of the form "GetTotalSpace ..." (golint)
    • Line 184: warning: exported function GetTotalAndFreeSpace should have comment or be unexported (golint)
    • Line 194: warning: comment on exported function GetUsedSpace should be of the form "GetUsedSpace ..." (golint)
    • Dragonfly2/pkg/dflog/logcore/init.go
    • Line 28: warning: exported function InitManager should have comment or be unexported (golint)
    • Line 56: warning: exported function InitScheduler should have comment or be unexported (golint)
    • Line 90: warning: exported function InitCdnSystem should have comment or be unexported (golint)
    • Line 135: warning: exported function InitDaemon should have comment or be unexported (golint)
    • Line 161: warning: exported function InitDfget should have comment or be unexported (golint)
    • Dragonfly2/pkg/rpc/cdnsystem/client/client.go
    • Line 33: warning: exported function GetClientByAddr should have comment or be unexported (golint)
    • Line 49: warning: exported function GetElasticClientByAdders should have comment or be unexported (golint)
    • Line 65: warning: comment on exported type CdnClient should be of the form "CdnClient ..." (with optional leading article) (golint)
    • Dragonfly2/cdnsystem/server/service/cdn_seed_server.go
    • Line 46: warning: comment on exported function NewCdnSeedServer should be of the form "NewCdnSeedServer ..." (golint)
    • Line 91: warning: exported method CdnSeedServer.ObtainSeeds should have comment or be unexported (golint)
    • Line 150: warning: exported method CdnSeedServer.GetPieceTasks should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!