Preparing report...

Report for github.com/alibaba/hybridnet

A+    Excellent!    Found 61 issues across 129 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!


gocyclo87%

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.

    • hybridnet/pkg/daemon/route/utils.go
    • Line 215: warning: cyclomatic complexity 38 of function ensureFromPodSubnetRuleAndRoutes() is high (> 15) (gocyclo)
    • Line 154: warning: cyclomatic complexity 16 of function checkIsFromPodSubnetRule() is high (> 15) (gocyclo)

golint55%

Golint is a linter for Go source code.

    • hybridnet/pkg/controller/ipam/cache.go
    • Line 29: warning: exported type Cache should have comment or be unexported (golint)
    • Line 46: warning: exported function NewCache should have comment or be unexported (golint)
    • Line 54: warning: exported method Cache.GetNetworkList should have comment or be unexported (golint)
    • Line 65: warning: exported method Cache.GetGlobalNetwork should have comment or be unexported (golint)
    • Line 72: warning: exported method Cache.SelectNetworkByLabels should have comment or be unexported (golint)
    • Line 85: warning: exported method Cache.MatchNetworkByLabels should have comment or be unexported (golint)
    • Line 95: warning: exported method Cache.UpdateNetworkCache should have comment or be unexported (golint)
    • Line 140: warning: exported method Cache.RemoveNetworkCache should have comment or be unexported (golint)
    • Line 151: warning: exported method Cache.UpdateNetworkUsage should have comment or be unexported (golint)
    • Line 163: warning: exported method Cache.GetNetworkUsage should have comment or be unexported (golint)
    • Line 174: warning: exported method Cache.UpdateNetworkUsages should have comment or be unexported (golint)
    • Line 200: warning: exported method Cache.GetNetworkUsages should have comment or be unexported (golint)
    • Line 217: warning: exported method Cache.UpdateSubnetUsage should have comment or be unexported (golint)
    • hybridnet/pkg/constants/labels.go
    • Line 20: warning: exported const LabelSubnet should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported const QuotaNonEmpty should have comment (or a comment on this block) or be unexported (golint)
    • hybridnet/pkg/apis/networking/v1/types.go
    • Line 43: warning: exported type Address should have comment or be unexported (golint)
    • Line 99: warning: exported type AddressRange should have comment or be unexported (golint)
    • Line 109: warning: exported type SubnetConfig should have comment or be unexported (golint)
    • Line 117: warning: exported type Count should have comment or be unexported (golint)
    • hybridnet/pkg/manager/manager.go
    • Line 45: warning: exported const Name should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: exported type Manager should have comment or be unexported (golint)
    • Line 72: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 116: warning: exported method Manager.RunOrDie should have comment or be unexported (golint)
    • Line 153: warning: exported method Manager.Run should have comment or be unexported (golint)
    • hybridnet/pkg/webhook/validating/network.go
    • Line 39: warning: exported function NetworkCreateValidation should have comment or be unexported (golint)
    • Line 79: warning: exported function NetworkUpdateValidation should have comment or be unexported (golint)
    • Line 110: warning: exported function NetworkDeleteValidation should have comment or be unexported (golint)
    • hybridnet/pkg/feature/feature.go
    • Line 35: warning: comment on exported const DualStack should be of the form "DualStack ..." (golint)
    • Line 42: warning: exported var DefaultRamaFeatureGates should have comment or be unexported (golint)
    • Line 49: warning: exported function DualStackEnabled should have comment or be unexported (golint)
    • Line 53: warning: exported function KnownFeatures should have comment or be unexported (golint)
    • hybridnet/pkg/apis/networking/v1/utils.go
    • Line 26: warning: exported function ValidateAddressRange should have comment or be unexported (golint)
    • Line 88: warning: exported function IsPrivateSubnet should have comment or be unexported (golint)
    • Line 96: warning: exported function IsIPv6Subnet should have comment or be unexported (golint)
    • Line 108: warning: exported function IsSubnetAutoNatOutgoing should have comment or be unexported (golint)
    • Line 116: warning: exported function CalculateCapacity should have comment or be unexported (golint)
    • Line 144: warning: exported function GetNetworkType should have comment or be unexported (golint)
    • hybridnet/pkg/daemon/route/route.go
    • Line 54: warning: exported type Manager should have comment or be unexported (golint)
    • Line 74: warning: exported function CreateRouteManager should have comment or be unexported (golint)
    • Line 170: warning: exported method Manager.ResetInfos should have comment or be unexported (golint)
    • Line 176: warning: exported method Manager.AddSubnetInfo should have comment or be unexported (golint)
    • Line 220: warning: exported method Manager.SyncRoutes should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/allocator/allocator.go
    • Line 26: warning: exported type Allocator should have comment or be unexported (golint)
    • Line 36: warning: exported function NewAllocator should have comment or be unexported (golint)
    • Line 52: warning: exported method Allocator.Refresh should have comment or be unexported (golint)
    • Line 100: warning: exported method Allocator.Allocate should have comment or be unexported (golint)
    • Line 122: warning: comment on exported method Allocator.Assign should be of the form "Assign ..." (golint)
    • Line 145: warning: exported method Allocator.Release should have comment or be unexported (golint)
    • Line 164: warning: exported method Allocator.Usage should have comment or be unexported (golint)
    • Line 176: warning: exported method Allocator.GetNetworksByType should have comment or be unexported (golint)
    • Line 183: warning: exported method Allocator.MatchNetworkType should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/interface.go
    • Line 25: warning: exported type Interface should have comment or be unexported (golint)
    • Line 35: warning: exported type Refresh should have comment or be unexported (golint)
    • Line 39: warning: exported type Usage should have comment or be unexported (golint)
    • Line 43: warning: exported type DualStackInterface should have comment or be unexported (golint)
    • Line 55: warning: exported type DualStackUsage should have comment or be unexported (golint)
    • Line 59: warning: exported type Store should have comment or be unexported (golint)
    • Line 69: warning: exported type DualStackStore should have comment or be unexported (golint)
    • Line 79: warning: exported type NetworkInterface should have comment or be unexported (golint)
    • hybridnet/pkg/webhook/mutating/handler.go
    • 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 48: warning: exported method Handler.Handle should have comment or be unexported (golint)
    • Line 67: warning: exported method Handler.InjectDecoder should have comment or be unexported (golint)
    • Line 72: warning: exported method Handler.InjectClient should have comment or be unexported (golint)
    • Line 77: warning: exported method Handler.InjectCache should have comment or be unexported (golint)
    • hybridnet/pkg/daemon/ipset/ipset.go
    • Line 100: warning: comment on exported type Interface should be of the form "Interface ..." (with optional leading article) (golint)
    • Line 116: warning: exported type Set should have comment or be unexported (golint)
    • Line 122: warning: exported type Entry should have comment or be unexported (golint)
    • hybridnet/pkg/daemon/addr/addr.go
    • Line 35: warning: exported type Manager should have comment or be unexported (golint)
    • Line 43: warning: exported function CreateAddrManager should have comment or be unexported (golint)
    • Line 51: warning: exported method Manager.ResetInfos should have comment or be unexported (golint)
    • Line 55: warning: exported method Manager.TryAddPodInfo should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method Manager.SyncAddresses should be of the form "SyncAddresses ..." (golint)
    • hybridnet/pkg/metrics/metrics.go
    • Line 24: warning: exported const IPTotalUsageType should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported var IPUsageGauge should have comment or be unexported (golint)
    • Line 41: warning: exported const IPStatefulAllocateType should have comment (or a comment on this block) or be unexported (golint)
    • Line 45: warning: exported var IPAllocationPeriodSummary should have comment or be unexported (golint)
    • Line 57: warning: exported function RegisterForManager should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/store/dualstack_store.go
    • Line 38: warning: exported type DualStackWorker should have comment or be unexported (golint)
    • Line 44: warning: exported function NewDualStackWorker should have comment or be unexported (golint)
    • Line 55: warning: exported method DualStackWorker.Couple should have comment or be unexported (golint)
    • Line 90: warning: exported method DualStackWorker.ReCouple should have comment or be unexported (golint)
    • Line 135: warning: exported method DualStackWorker.IPRecycle should have comment or be unexported (golint)
    • Line 139: warning: exported method DualStackWorker.IPUnBind should have comment or be unexported (golint)
    • Line 143: warning: exported method DualStackWorker.SyncNetworkUsage should have comment or be unexported (golint)
    • Line 163: warning: exported method DualStackWorker.SyncSubnetUsage should have comment or be unexported (golint)
    • Line 167: warning: exported method DualStackWorker.SyncNetworkStatus should have comment or be unexported (golint)
    • hybridnet/pkg/apis/networking/v1/constants.go
    • Line 19: warning: exported type IPVersion should have comment or be unexported (golint)
    • Line 22: warning: exported const IPv4 should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported type IPPhase should have comment or be unexported (golint)
    • Line 29: warning: exported const IPPhaseUsing should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported type NetworkType should have comment or be unexported (golint)
    • Line 36: warning: exported const NetworkTypeUnderlay should have comment (or a comment on this block) or be unexported (golint)
    • hybridnet/pkg/daemon/utils/ip_range.go
    • Line 28: warning: exported type IPRange should have comment or be unexported (golint)
    • Line 33: warning: exported function CreateIPRange should have comment or be unexported (golint)
    • Line 48: warning: exported method IPRange.TryAddIP should have comment or be unexported (golint)
    • Line 67: warning: comment on exported function FindSubnetExcludeIPBlocks should be of the form "FindSubnetExcludeIPBlocks ..." (golint)
    • Line 232: warning: exported function LastIP should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/types/constants.go
    • Line 24: warning: exported type IPFamilyMode should have comment or be unexported (golint)
    • Line 27: warning: exported const IPv4Only should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported function ParseIPFamilyFromString should have comment or be unexported (golint)
    • Line 45: warning: exported type NetworkType should have comment or be unexported (golint)
    • Line 48: warning: exported const Underlay should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported function ParseNetworkTypeFromString should have comment or be unexported (golint)
    • Line 65: warning: comment on exported function ParseNetworkTypeFromEnv should be of the form "ParseNetworkTypeFromEnv ..." (golint)
    • hybridnet/pkg/daemon/route/utils.go
    • Line 34: warning: exported const MinRouteTableNum should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported type SubnetInfo should have comment or be unexported (golint)
    • Line 50: warning: exported type SubnetInfoMap should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/store/store.go
    • Line 41: 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 53: warning: exported method Worker.Couple should have comment or be unexported (golint)
    • Line 80: warning: exported method Worker.ReCouple should have comment or be unexported (golint)
    • Line 102: warning: exported method Worker.IPRecycle should have comment or be unexported (golint)
    • Line 106: warning: exported method Worker.IPUnBind should have comment or be unexported (golint)
    • Line 114: warning: exported method Worker.SyncNetworkStatus should have comment or be unexported (golint)
    • Line 127: warning: exported method Worker.SyncNetworkUsage should have comment or be unexported (golint)
    • Line 142: warning: exported method Worker.SyncSubnetUsage should have comment or be unexported (golint)
    • hybridnet/pkg/daemon/controller/controller.go
    • Line 58: warning: exported const ActionReconcileSubnet should have comment (or a comment on this block) or be unexported (golint)
    • Line 252: warning: exported method Controller.GetIPInstanceLister should have comment or be unexported (golint)
    • Line 256: warning: exported method Controller.GetNetworkLister should have comment or be unexported (golint)
    • Line 260: warning: exported method Controller.GetIPInstanceSynced should have comment or be unexported (golint)
    • hybridnet/pkg/daemon/neigh/neigh.go
    • Line 28: warning: exported type IPMap should have comment or be unexported (golint)
    • Line 30: warning: exported type Manager should have comment or be unexported (golint)
    • Line 39: warning: exported function CreateNeighManager should have comment or be unexported (golint)
    • Line 46: warning: exported method Manager.ResetInfos should have comment or be unexported (golint)
    • Line 50: warning: exported method Manager.AddPodInfo should have comment or be unexported (golint)
    • Line 58: warning: exported method Manager.SyncNeighs should have comment or be unexported (golint)
    • hybridnet/pkg/daemon/neigh/utils.go
    • Line 26: warning: comment on exported function ClearStaleNeighEntryByIP should be of the form "ClearStaleNeighEntryByIP ..." (golint)
    • Line 49: warning: exported function ClearStaleNeighEntries should have comment or be unexported (golint)
    • hybridnet/pkg/utils/transform/ipam.go
    • Line 27: warning: exported function TransferSubnetForIPAM should have comment or be unexported (golint)
    • Line 45: warning: exported function TransferNetworkForIPAM should have comment or be unexported (golint)
    • Line 53: warning: exported function TransferIPInstanceForIPAM should have comment or be unexported (golint)
    • hybridnet/pkg/controller/ipam/usage.go
    • Line 30: warning: exported type UsageSyncer should have comment or be unexported (golint)
    • Line 46: warning: exported function NewUsageSyncer should have comment or be unexported (golint)
    • Line 54: warning: exported function NewDualStackUsageSyncer should have comment or be unexported (golint)
    • Line 62: warning: exported method UsageSyncer.Run should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/types/types.go
    • Line 22: warning: exported const IPStatusUsing should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported type Network should have comment or be unexported (golint)
    • Line 36: warning: exported type NetworkSet should have comment or be unexported (golint)
    • Line 38: warning: exported type Subnet should have comment or be unexported (golint)
    • Line 61: warning: exported type SubnetSlice should have comment or be unexported (golint)
    • Line 69: warning: exported type IP should have comment or be unexported (golint)
    • Line 82: warning: exported type IPSet should have comment or be unexported (golint)
    • Line 84: warning: exported type IPSlice should have comment or be unexported (golint)
    • Line 91: warning: exported type Usage should have comment or be unexported (golint)
    • hybridnet/pkg/daemon/controller/node.go
    • Line 41: warning: exported type NodeIPCache should have comment or be unexported (golint)
    • Line 48: warning: exported function NewNodeIPCache should have comment or be unexported (golint)
    • Line 55: warning: exported method NodeIPCache.UpdateNodeIPs should have comment or be unexported (golint)
    • Line 85: warning: exported method NodeIPCache.SearchIP should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/strategy/strategy.go
    • Line 39: warning: exported var StatefulWorkloadKind should have comment or be unexported (golint)
    • Line 69: warning: exported function OwnByStatefulWorkload should have comment or be unexported (golint)
    • Line 78: warning: exported function OwnByStatelessWorkload should have comment or be unexported (golint)
    • Line 87: warning: exported function GetKnownOwnReference should have comment or be unexported (golint)
    • Line 95: warning: exported function GetIPByPod should have comment or be unexported (golint)
    • Line 112: warning: exported function GetIPsByPod should have comment or be unexported (golint)
    • Line 134: warning: exported function GetAllocatedIPsByPod should have comment or be unexported (golint)
    • Line 151: warning: exported function GetIndexFromName should have comment or be unexported (golint)
    • hybridnet/pkg/utils/ip.go
    • Line 21: warning: exported function StringToIPNet should have comment or be unexported (golint)
    • Line 27: warning: comment on exported function NormalizedIP should be of the form "NormalizedIP ..." (golint)
    • hybridnet/pkg/daemon/utils/utils.go
    • Line 30: warning: exported type RamaDaemonError should have comment or be unexported (golint)
    • Line 37: warning: exported const NotExist should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported function ValidDockerNetnsDir should have comment or be unexported (golint)
    • Line 51: warning: exported function IsProcFS should have comment or be unexported (golint)
    • Line 58: warning: exported function IsNsFS should have comment or be unexported (golint)
    • Line 65: warning: exported function IsFs should have comment or be unexported (golint)
    • Line 79: warning: exported function SetSysctlIgnoreNotExist should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/types/network.go
    • Line 25: warning: exported var ErrNotFoundNetwork should have comment or be unexported (golint)
    • Line 28: warning: exported function NewNetworkSet should have comment or be unexported (golint)
    • Line 32: warning: exported method NetworkSet.RefreshNetwork should have comment or be unexported (golint)
    • Line 36: warning: exported method NetworkSet.RemoveNetwork should have comment or be unexported (golint)
    • Line 40: warning: exported method NetworkSet.GetNetwork should have comment or be unexported (golint)
    • Line 48: warning: exported method NetworkSet.GetNetworksByType should have comment or be unexported (golint)
    • Line 57: warning: exported method NetworkSet.MatchNetworkType should have comment or be unexported (golint)
    • Line 66: warning: exported function NewNetwork should have comment or be unexported (golint)
    • Line 76: warning: exported method Network.AddSubnet should have comment or be unexported (golint)
    • Line 80: warning: exported method Network.GetSubnet should have comment or be unexported (golint)
    • Line 88: warning: exported method Network.GetSubnetByIP should have comment or be unexported (golint)
    • Line 96: warning: exported method Network.GetIPv4Subnet should have comment or be unexported (golint)
    • Line 110: warning: exported method Network.GetIPv6Subnet should have comment or be unexported (golint)
    • Line 124: warning: exported method Network.GetPairedDualStackSubnets should have comment or be unexported (golint)
    • Line 147: warning: exported method Network.Usage should have comment or be unexported (golint)
    • Line 163: warning: exported method Network.DualStackUsage should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/types/subnet.go
    • Line 28: warning: exported var ErrNoAvailableSubnet should have comment or be unexported (golint)
    • Line 34: warning: exported function NewSubnetSlice should have comment or be unexported (golint)
    • Line 41: warning: exported method SubnetSlice.AddSubnet should have comment or be unexported (golint)
    • Line 60: warning: exported method SubnetSlice.GetSubnet should have comment or be unexported (golint)
    • Line 68: warning: exported method SubnetSlice.GetAvailableSubnet should have comment or be unexported (golint)
    • Line 86: warning: exported method SubnetSlice.GetAvailableIPv4Subnet should have comment or be unexported (golint)
    • Line 109: warning: exported method SubnetSlice.GetAvailableIPv6Subnet should have comment or be unexported (golint)
    • Line 135: warning: exported method SubnetSlice.GetAvailablePairedDualStackSubnets should have comment or be unexported (golint)
    • Line 165: warning: exported method SubnetSlice.GetSubnetByIP should have comment or be unexported (golint)
    • Line 175: warning: exported method SubnetSlice.CurrentSubnet should have comment or be unexported (golint)
    • Line 183: warning: exported method SubnetSlice.Usage should have comment or be unexported (golint)
    • Line 193: warning: exported method SubnetSlice.DualStackUsage should have comment or be unexported (golint)
    • Line 300: warning: exported function NewSubnet should have comment or be unexported (golint)
    • Line 495: warning: exported method Subnet.IsAvailable should have comment or be unexported (golint)
    • Line 505: warning: exported method Subnet.Usage should have comment or be unexported (golint)
    • Line 514: warning: exported method Subnet.AllocateNext should have comment or be unexported (golint)
    • Line 543: warning: exported method Subnet.Release should have comment or be unexported (golint)
    • Line 551: warning: exported method Subnet.Assign should have comment or be unexported (golint)
    • Line 582: warning: exported method Subnet.IsReservedIP should have comment or be unexported (golint)
    • Line 587: warning: exported method Subnet.IsBlackIP should have comment or be unexported (golint)
    • Line 592: warning: exported method Subnet.IsIPv6 should have comment or be unexported (golint)
    • hybridnet/pkg/webhook/validating/handler.go
    • 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 48: warning: exported method Handler.Handle should have comment or be unexported (golint)
    • Line 67: warning: exported method Handler.InjectDecoder should have comment or be unexported (golint)
    • Line 72: warning: exported method Handler.InjectClient should have comment or be unexported (golint)
    • Line 77: warning: exported method Handler.InjectCache should have comment or be unexported (golint)
    • hybridnet/pkg/controller/ipam/controller.go
    • Line 47: warning: exported const ControllerName should have comment or be unexported (golint)
    • Line 49: warning: exported type Controller should have comment or be unexported (golint)
    • Line 96: warning: exported function NewController should have comment or be unexported (golint)
    • Line 186: warning: exported method Controller.Run should have comment or be unexported (golint)
    • hybridnet/pkg/daemon/iptables/iptables.go
    • Line 32: warning: exported const TableNAT should have comment (or a comment on this block) or be unexported (golint)
    • Line 62: warning: exported type Manager should have comment or be unexported (golint)
    • Line 85: warning: exported function CreateIPtablesManager should have comment or be unexported (golint)
    • Line 126: warning: exported method Manager.Reset should have comment or be unexported (golint)
    • Line 133: warning: exported method Manager.RecordNodeIP should have comment or be unexported (golint)
    • Line 137: warning: exported method Manager.RecordSubnet should have comment or be unexported (golint)
    • Line 145: warning: exported method Manager.SetOverlayIfName should have comment or be unexported (golint)
    • Line 149: warning: exported method Manager.SyncRules should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/types/ip.go
    • Line 21: warning: exported function NewIPSet should have comment or be unexported (golint)
    • Line 25: warning: exported method IPSet.Has should have comment or be unexported (golint)
    • Line 30: warning: exported method IPSet.Add should have comment or be unexported (golint)
    • Line 34: warning: exported method IPSet.Update should have comment or be unexported (golint)
    • Line 49: warning: exported method IPSet.Delete should have comment or be unexported (golint)
    • Line 53: warning: exported method IPSet.Get should have comment or be unexported (golint)
    • Line 57: warning: exported method IPSet.Count should have comment or be unexported (golint)
    • Line 61: warning: exported function NewIPSlice should have comment or be unexported (golint)
    • Line 69: warning: exported method IPSlice.Add should have comment or be unexported (golint)
    • Line 77: warning: exported method IPSlice.Count should have comment or be unexported (golint)
    • Line 81: warning: exported method IPSlice.Next should have comment or be unexported (golint)
    • Line 86: warning: exported method IPSlice.Current should have comment or be unexported (golint)
    • Line 97: warning: exported method IP.IsIPv6 should have comment or be unexported (golint)
    • hybridnet/pkg/webhook/validating/ip.go
    • Line 34: warning: exported function IPInstanceCreateValidation should have comment or be unexported (golint)
    • Line 38: warning: exported function IPInstanceUpdateValidation should have comment or be unexported (golint)
    • Line 42: warning: exported function IPInstanceDeleteValidation should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/allocator/dualstack_allocator.go
    • Line 26: warning: exported type DualStackAllocator should have comment or be unexported (golint)
    • Line 36: warning: exported function NewDualStackAllocator should have comment or be unexported (golint)
    • Line 52: warning: exported method DualStackAllocator.Refresh should have comment or be unexported (golint)
    • Line 65: warning: exported method DualStackAllocator.Usage should have comment or be unexported (golint)
    • Line 77: warning: exported method DualStackAllocator.Allocate should have comment or be unexported (golint)
    • Line 188: warning: exported method DualStackAllocator.Assign should have comment or be unexported (golint)
    • Line 328: warning: exported method DualStackAllocator.Release should have comment or be unexported (golint)
    • Line 421: warning: exported method DualStackAllocator.GetNetworksByType should have comment or be unexported (golint)
    • Line 428: warning: exported method DualStackAllocator.MatchNetworkType should have comment or be unexported (golint)
    • hybridnet/pkg/ipam/allocator/types.go
    • Line 23: warning: exported type NetworkGetter should have comment or be unexported (golint)
    • Line 25: warning: exported type SubnetGetter should have comment or be unexported (golint)
    • Line 27: warning: exported type IPSetGetter should have comment or be unexported (golint)
    • hybridnet/pkg/webhook/mutating/pod.go
    • Line 39: warning: comment on exported const TaintNodeNetworkUnavailable should be of the form "TaintNodeNetworkUnavailable ..." (golint)
    • Line 50: warning: exported function PodCreateMutation should have comment or be unexported (golint)
    • hybridnet/pkg/webhook/validating/subnet.go
    • Line 37: warning: exported const MaxSubnetCapacity should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: exported function SubnetCreateValidation should have comment or be unexported (golint)
    • Line 122: warning: exported function SubnetUpdateValidation should have comment or be unexported (golint)
    • Line 181: warning: exported function SubnetDeleteValidation should have comment or be unexported (golint)
    • hybridnet/pkg/daemon/containernetwork/utils.go
    • Line 32: warning: exported type IPInfo should have comment or be unexported (golint)
    • Line 38: warning: exported function GenerateVlanNetIfName should have comment or be unexported (golint)
    • Line 54: warning: exported function GenerateVxlanNetIfName should have comment or be unexported (golint)
    • Line 67: warning: exported function EnsureVlanIf should have comment or be unexported (golint)
    • Line 112: warning: exported function GetDefaultInterface should have comment or be unexported (golint)
    • Line 130: warning: exported function GetDefaultRoute should have comment or be unexported (golint)
    • Line 150: warning: comment on exported function GetInterfaceByPreferString should be of the form "GetInterfaceByPreferString ..." (golint)
    • Line 169: warning: exported function GenerateIPListString should have comment or be unexported (golint)
    • Line 182: warning: exported function ListAllAddress should have comment or be unexported (golint)
    • Line 210: warning: exported function ListLocalAddressExceptLink should have comment or be unexported (golint)
    • Line 236: warning: exported function CheckIPIsGlobalUnicast should have comment or be unexported (golint)
    • hybridnet/pkg/daemon/vxlan/vxlan.go
    • Line 36: warning: exported type Device should have comment or be unexported (golint)
    • Line 43: warning: exported function NewVxlanDevice should have comment or be unexported (golint)
    • Line 100: warning: exported method Device.MacAddr should have comment or be unexported (golint)
    • Line 104: warning: exported method Device.Link should have comment or be unexported (golint)
    • Line 108: warning: exported method Device.RecordVtepInfo should have comment or be unexported (golint)
    • Line 112: warning: exported method Device.SyncVtepInfo 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!