Preparing report...

Report for github.com/packethost/packngo

A+    Excellent!    Found 18 issues across 72 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!


golint75%

Golint is a linter for Go source code.

    • packngo/api_call_options.go
    • Line 10: warning: exported type ListSortDirection should have comment or be unexported (golint)
    • Line 13: warning: exported const SortDirectionAsc should have comment (or a comment on this block) or be unexported (golint)
    • Line 61: warning: exported type ListOptions should have comment or be unexported (golint)
    • Line 62: warning: exported type SearchOptions should have comment or be unexported (golint)
    • Line 64: warning: exported type QueryAppender should have comment or be unexported (golint)
    • Line 81: warning: exported method GetOptions.WithQuery should have comment or be unexported (golint)
    • Line 95: warning: exported method GetOptions.GetPage should have comment or be unexported (golint)
    • Line 102: warning: exported method GetOptions.CopyOrNew should have comment or be unexported (golint)
    • packngo/ip.go
    • Line 42: warning: exported type IpAddressCommon should have comment or be unexported (golint)
    • packngo/spotmarketrequest.go
    • Line 10: warning: exported type SpotMarketRequestService should have comment or be unexported (golint)
    • Line 17: warning: exported type SpotMarketRequestCreateRequest should have comment or be unexported (golint)
    • Line 28: warning: exported type SpotMarketRequest should have comment or be unexported (golint)
    • Line 39: warning: exported type SpotMarketRequestInstanceParameters should have comment or be unexported (golint)
    • Line 58: warning: exported type SpotMarketRequestServiceOp should have comment or be unexported (golint)
    • Line 67: warning: exported method SpotMarketRequestServiceOp.Create should have comment or be unexported (golint)
    • Line 83: warning: exported method SpotMarketRequestServiceOp.List should have comment or be unexported (golint)
    • Line 100: warning: exported method SpotMarketRequestServiceOp.Get should have comment or be unexported (golint)
    • Line 113: warning: exported method SpotMarketRequestServiceOp.Delete should have comment or be unexported (golint)
    • packngo/examples/otp.go
    • Line 13: warning: exported function GetOtpSms should have comment or be unexported (golint)
    • Line 28: warning: exported function SeedOtpApp should have comment or be unexported (golint)
    • Line 50: warning: exported function GetOtpApp should have comment or be unexported (golint)
    • Line 60: warning: exported function TestSMSEnable should have comment or be unexported (golint)
    • Line 89: warning: exported function TestAppEnable should have comment or be unexported (golint)
    • packngo/capacities.go
    • Line 100: warning: comment on exported method CapacityServiceOp.CheckMetros should be of the form "CheckMetros ..." (golint)
    • packngo/payment_methods.go
    • Line 6: warning: comment on exported type PaymentMethodService should be of the form "PaymentMethodService ..." (with optional leading article) (golint)
    • packngo/connections.go
    • Line 7: warning: exported type ConnectionRedundancy should have comment or be unexported (golint)
    • Line 8: warning: exported type ConnectionType should have comment or be unexported (golint)
    • Line 9: warning: exported type ConnectionPortRole should have comment or be unexported (golint)
    • Line 13: warning: exported const ConnectionShared should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type ConnectionService should have comment or be unexported (golint)
    • Line 35: warning: exported type ConnectionServiceOp should have comment or be unexported (golint)
    • Line 48: warning: exported type ConnectionPort should have comment or be unexported (golint)
    • Line 60: warning: exported type Connection should have comment or be unexported (golint)
    • Line 77: warning: exported type ConnectionCreateRequest should have comment or be unexported (golint)
    • Line 89: warning: exported method Connection.PortByRole should have comment or be unexported (golint)
    • Line 108: warning: exported method ConnectionServiceOp.OrganizationCreate should have comment or be unexported (golint)
    • Line 113: warning: exported method ConnectionServiceOp.ProjectCreate should have comment or be unexported (golint)
    • Line 140: warning: exported method ConnectionServiceOp.OrganizationList should have comment or be unexported (golint)
    • Line 145: warning: exported method ConnectionServiceOp.ProjectList should have comment or be unexported (golint)
    • Line 150: warning: exported method ConnectionServiceOp.Delete should have comment or be unexported (golint)
    • Line 155: warning: exported method ConnectionServiceOp.Port should have comment or be unexported (golint)
    • Line 166: warning: exported method ConnectionServiceOp.Get should have comment or be unexported (golint)
    • Line 177: warning: exported method ConnectionServiceOp.Ports should have comment or be unexported (golint)
    • Line 189: warning: exported method ConnectionServiceOp.Events should have comment or be unexported (golint)
    • Line 194: warning: exported method ConnectionServiceOp.PortEvents should have comment or be unexported (golint)
    • Line 199: warning: exported method ConnectionServiceOp.VirtualCircuits should have comment or be unexported (golint)
    • packngo/devices.go
    • Line 14: warning: exported const NetworkTypeHybrid should have comment (or a comment on this block) or be unexported (golint)
    • Line 81: warning: exported type NetworkInfo should have comment or be unexported (golint)
    • Line 87: warning: exported type BandwidthIO should have comment or be unexported (golint)
    • Line 92: warning: exported method BandwidthIO.UnmarshalJSON should have comment or be unexported (golint)
    • Line 111: warning: exported type BandwidthTarget should have comment or be unexported (golint)
    • Line 119: warning: comment on exported type BandwidthTags should be of the form "BandwidthTags ..." (with optional leading article) (golint)
    • Line 128: warning: comment on exported type BandwidthComponent should be of the form "BandwidthComponent ..." (with optional leading article) (golint)
    • Line 139: warning: exported type Datapoint should have comment or be unexported (golint)
    • Line 147: warning: exported method Datapoint.UnmarshalJSON should have comment or be unexported (golint)
    • Line 159: warning: exported type BandwidthOpts should have comment or be unexported (golint)
    • Line 164: warning: exported method BandwidthOpts.Encode should have comment or be unexported (golint)
    • Line 178: warning: exported method BandwidthOpts.WithQuery should have comment or be unexported (golint)
    • Line 187: warning: exported method DeviceServiceOp.GetBandwidth should have comment or be unexported (golint)
    • Line 198: warning: exported method Device.GetNetworkInfo should have comment or be unexported (golint)
    • Line 221: warning: exported method Device.NumOfBonds should have comment or be unexported (golint)
    • Line 231: warning: exported method Device.GetPortsInBond should have comment or be unexported (golint)
    • Line 242: warning: exported method Device.GetBondPorts should have comment or be unexported (golint)
    • Line 253: warning: exported method Device.GetPhysicalPorts should have comment or be unexported (golint)
    • Line 264: warning: exported method Device.GetPortByName should have comment or be unexported (golint)
    • Line 292: warning: exported method Device.HasManagementIPs should have comment or be unexported (golint)
    • Line 330: warning: exported type IPAddressCreateRequest should have comment or be unexported (golint)
    • Line 436: warning: exported type DeviceDeleteRequest should have comment or be unexported (golint)
    • Line 459: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 483: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 496: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 508: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 524: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 532: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 540: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 548: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 560: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 568: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 575: warning: exported method DeviceServiceOp.ListBGPNeighbors should have comment or be unexported (golint)
    • Line 575: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 589: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • Line 612: warning: receiver name s should be consistent with previous receiver name d for DeviceServiceOp (golint)
    • packngo/user.go
    • Line 57: warning: comment on exported method UserServiceOp.List should be of the form "List ..." (golint)
    • Line 78: warning: comment on exported method UserServiceOp.Current should be of the form "Current ..." (golint)
    • Line 90: warning: exported method UserServiceOp.Get should have comment or be unexported (golint)
    • packngo/virtualnetworks.go
    • Line 9: warning: comment on exported type ProjectVirtualNetworkService should be of the form "ProjectVirtualNetworkService ..." (with optional leading article) (golint)
    • Line 17: warning: exported type VirtualNetwork should have comment or be unexported (golint)
    • Line 31: warning: exported type ProjectVirtualNetworkServiceOp should have comment or be unexported (golint)
    • Line 35: warning: exported type VirtualNetworkListResponse should have comment or be unexported (golint)
    • Line 39: warning: exported method ProjectVirtualNetworkServiceOp.List should have comment or be unexported (golint)
    • Line 52: warning: exported type VirtualNetworkCreateRequest should have comment or be unexported (golint)
    • Line 71: warning: exported method ProjectVirtualNetworkServiceOp.Get should have comment or be unexported (golint)
    • Line 84: warning: exported method ProjectVirtualNetworkServiceOp.Create should have comment or be unexported (golint)
    • Line 99: warning: exported method ProjectVirtualNetworkServiceOp.Delete should have comment or be unexported (golint)
    • packngo/metadata/metadata.go
    • Line 12: warning: exported const BaseURL should have comment or be unexported (golint)
    • Line 14: warning: exported function GetMetadata should have comment or be unexported (golint)
    • Line 18: warning: exported function GetMetadataFromURL should have comment or be unexported (golint)
    • Line 46: warning: exported function GetUserData should have comment or be unexported (golint)
    • Line 50: warning: exported function GetUserDataFromURL should have comment or be unexported (golint)
    • Line 61: warning: exported type AddressFamily should have comment or be unexported (golint)
    • Line 64: warning: exported const IPv4 should have comment (or a comment on this block) or be unexported (golint)
    • Line 68: warning: exported type AddressInfo should have comment or be unexported (golint)
    • Line 82: warning: exported type BondingMode should have comment or be unexported (golint)
    • Line 85: warning: exported const BondingBalanceRR should have comment (or a comment on this block) or be unexported (golint)
    • Line 111: warning: exported type CurrentDevice should have comment or be unexported (golint)
    • Line 128: warning: exported type InterfaceInfo should have comment or be unexported (golint)
    • Line 133: warning: exported method InterfaceInfo.ParseMAC should have comment or be unexported (golint)
    • Line 137: warning: exported type NetworkInfo should have comment or be unexported (golint)
    • Line 146: warning: exported method NetworkInfo.BondingMode should have comment or be unexported (golint)
    • Line 150: warning: exported type OperatingSystem should have comment or be unexported (golint)
    • Line 156: warning: exported type VolumeInfo should have comment or be unexported (golint)
    • packngo/bgp_sessions.go
    • Line 42: warning: comment on exported type BGPNeighbor should be of the form "BGPNeighbor ..." (with optional leading article) (golint)
    • packngo/device_ports.go
    • Line 80: warning: don't use underscores in Go names; method parameter bulk_enable should be bulkEnable (golint)
    • Line 91: warning: don't use underscores in Go names; method parameter bulk_disable should be bulkDisable (golint)
    • packngo/ports.go
    • Line 20: warning: exported type PortServiceOp should have comment or be unexported (golint)
    • Line 26: warning: exported type PortData should have comment or be unexported (golint)
    • Line 35: warning: exported type BondData should have comment or be unexported (golint)
    • Line 77: warning: exported type AddressRequest should have comment or be unexported (golint)
    • Line 82: warning: exported type BackToL3Request should have comment or be unexported (golint)
    • Line 86: warning: exported type PortAssignRequest should have comment or be unexported (golint)
    • Line 97: warning: exported type BondRequest should have comment or be unexported (golint)
    • Line 101: warning: exported type DisbondRequest should have comment or be unexported (golint)
    • Line 199: warning: receiver name s should be consistent with previous receiver name i for PortServiceOp (golint)
    • packngo/virtualcircuits.go
    • Line 8: warning: comment on exported const VCStatusPending should be of the form "VCStatusPending ..." (golint)
    • Line 11: warning: comment on exported const VCStatusActive should be of the form "VCStatusActive ..." (golint)
    • Line 14: warning: comment on exported const VCStatusWaiting should be of the form "VCStatusWaiting ..." (golint)
    • Line 17: warning: comment on exported const VCStatusDeleting should be of the form "VCStatusDeleting ..." (golint)
    • Line 20: warning: comment on exported const VCStatusActivating should be of the form "VCStatusActivating ..." (golint)
    • Line 23: warning: exported const VCStatusDeactivating should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type VirtualCircuitService should have comment or be unexported (golint)
    • Line 36: warning: exported type VCUpdateRequest should have comment or be unexported (golint)
    • Line 40: warning: exported type VCCreateRequest should have comment or be unexported (golint)
    • Line 46: warning: exported type VirtualCircuitServiceOp should have comment or be unexported (golint)
    • Line 55: warning: exported type VirtualCircuit should have comment or be unexported (golint)
    • Line 76: warning: exported method VirtualCircuitServiceOp.Update should have comment or be unexported (golint)
    • Line 82: warning: exported method VirtualCircuitServiceOp.Events should have comment or be unexported (golint)
    • Line 87: warning: exported method VirtualCircuitServiceOp.Get should have comment or be unexported (golint)
    • Line 93: warning: exported method VirtualCircuitServiceOp.Delete should have comment or be unexported (golint)
    • Line 98: warning: exported method VirtualCircuitServiceOp.Create should have comment or be unexported (golint)

gocyclo100%

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.

No problems detected. Good job!


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!