Preparing report...

Report for github.com/thingspin/canopus

A    Great!    Found 39 issues across 45 files

Tweet

gofmt95%

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


go_vet100%

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

No problems detected. Good job!


gocyclo91%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • canopus/utils.go
    • Line 74: warning: cyclomatic complexity 28 of function CoapCodeToString() is high (> 15) (gocyclo)
    • canopus/server.go
    • Line 73: warning: cyclomatic complexity 25 of function (*DefaultCoapServer).handleRequest() is high (> 15) (gocyclo)

golint48%

Golint is a linter for Go source code.

    • canopus/coreresource.go
    • Line 3: warning: comment on exported function NewCoreAttribute should be of the form "NewCoreAttribute ..." (golint)
    • Line 11: warning: comment on exported function NewCoreResource should be of the form "NewCoreResource ..." (golint)
    • canopus/event.go
    • Line 3: warning: exported function NewEvents should have comment or be unexported (golint)
    • Line 17: warning: comment on exported type ServerEvents should be of the form "ServerEvents ..." (with optional leading article) (golint)
    • Line 36: warning: comment on exported method ServerEvents.OnStart should be of the form "OnStart ..." (golint)
    • Line 41: warning: comment on exported method ServerEvents.OnClose should be of the form "OnClose ..." (golint)
    • Line 46: warning: comment on exported method ServerEvents.OnDiscover should be of the form "OnDiscover ..." (golint)
    • Line 51: warning: comment on exported method ServerEvents.OnError should be of the form "OnError ..." (golint)
    • Line 56: warning: comment on exported method ServerEvents.OnObserve should be of the form "OnObserve ..." (golint)
    • Line 61: warning: comment on exported method ServerEvents.OnObserveCancel should be of the form "OnObserveCancel ..." (golint)
    • Line 66: warning: comment on exported method ServerEvents.OnMessage should be of the form "OnMessage ..." (golint)
    • Line 71: warning: comment on exported method ServerEvents.OnBlockMessage should be of the form "OnBlockMessage ..." (golint)
    • Line 76: warning: comment on exported method ServerEvents.Notify should be of the form "Notify ..." (golint)
    • Line 83: warning: comment on exported method ServerEvents.Started should be of the form "Started ..." (golint)
    • Line 90: warning: comment on exported method ServerEvents.Closed should be of the form "Closed ..." (golint)
    • Line 97: warning: comment on exported method ServerEvents.Discover should be of the form "Discover ..." (golint)
    • Line 111: warning: comment on exported method ServerEvents.Observe should be of the form "Observe ..." (golint)
    • Line 118: warning: comment on exported method ServerEvents.ObserveCancelled should be of the form "ObserveCancelled ..." (golint)
    • Line 125: warning: comment on exported method ServerEvents.Message should be of the form "Message ..." (golint)
    • Line 133: warning: comment on exported method ServerEvents.BlockMessage should be of the form "BlockMessage ..." (golint)
    • canopus/routes.go
    • Line 8: warning: comment on exported function CreateNewRegExRoute should be of the form "CreateNewRegExRoute ..." (golint)
    • Line 41: warning: comment on exported type RegExRoute should be of the form "RegExRoute ..." (with optional leading article) (golint)
    • Line 51: warning: exported method RegExRoute.Matches should have comment or be unexported (golint)
    • Line 65: warning: exported method RegExRoute.GetMethod should have comment or be unexported (golint)
    • Line 69: warning: exported method RegExRoute.GetMediaTypes should have comment or be unexported (golint)
    • Line 73: warning: exported method RegExRoute.GetConfiguredPath should have comment or be unexported (golint)
    • Line 77: warning: exported method RegExRoute.AutoAcknowledge should have comment or be unexported (golint)
    • Line 81: warning: exported method RegExRoute.Handle should have comment or be unexported (golint)
    • canopus/serverconn.go
    • Line 8: warning: exported type UDPServerConnection should have comment or be unexported (golint)
    • Line 12: warning: exported method UDPServerConnection.ReadFrom should have comment or be unexported (golint)
    • Line 16: warning: exported method UDPServerConnection.WriteTo should have comment or be unexported (golint)
    • Line 20: warning: exported method UDPServerConnection.Close should have comment or be unexported (golint)
    • Line 24: warning: exported method UDPServerConnection.LocalAddr should have comment or be unexported (golint)
    • Line 28: warning: exported method UDPServerConnection.SetDeadline should have comment or be unexported (golint)
    • Line 32: warning: exported method UDPServerConnection.SetReadDeadline should have comment or be unexported (golint)
    • Line 36: warning: exported method UDPServerConnection.SetWriteDeadline should have comment or be unexported (golint)
    • canopus/session.go
    • Line 5: warning: exported type UDPServerSession should have comment or be unexported (golint)
    • Line 13: warning: exported method UDPServerSession.GetConnection should have comment or be unexported (golint)
    • Line 17: warning: exported method UDPServerSession.GetAddress should have comment or be unexported (golint)
    • Line 21: warning: exported method UDPServerSession.WriteBuffer should have comment or be unexported (golint)
    • Line 39: warning: exported method UDPServerSession.GetServer should have comment or be unexported (golint)
    • canopus/utils.go
    • Line 11: warning: comment on exported function PayloadAsString should be of the form "PayloadAsString ..." (golint)
    • Line 19: warning: comment on exported function GenerateMessageID should be of the form "GenerateMessageID ..." (golint)
    • canopus/xml.go
    • Line 3: warning: comment on exported type XMLPayload should be of the form "XMLPayload ..." (with optional leading article) (golint)
    • canopus/client.go
    • Line 5: warning: exported function Dial should have comment or be unexported (golint)
    • Line 18: warning: exported function NewObserveMessage should have comment or be unexported (golint)
    • Line 26: warning: exported type CoapObserveMessage should have comment or be unexported (golint)
    • Line 33: warning: exported method CoapObserveMessage.GetResource should have comment or be unexported (golint)
    • Line 37: warning: exported method CoapObserveMessage.GetValue should have comment or be unexported (golint)
    • Line 41: warning: exported method CoapObserveMessage.GetMessage should have comment or be unexported (golint)
    • canopus/corelink.go
    • Line 3: warning: comment on exported type CoreLinkFormatPayload should be of the form "CoreLinkFormatPayload ..." (with optional leading article) (golint)
    • Line 7: warning: exported method CoreLinkFormatPayload.GetBytes should have comment or be unexported (golint)
    • Line 11: warning: exported method CoreLinkFormatPayload.Length should have comment or be unexported (golint)
    • canopus/json.go
    • Line 8: warning: exported function NewJSONPayload should have comment or be unexported (golint)
    • Line 14: warning: comment on exported type JSONPayload should be of the form "JSONPayload ..." (with optional leading article) (golint)
    • Line 19: warning: exported method JSONPayload.GetBytes should have comment or be unexported (golint)
    • Line 31: warning: exported method JSONPayload.Length should have comment or be unexported (golint)
    • canopus/options.go
    • Line 8: warning: comment on exported type CoapOption should be of the form "CoapOption ..." (with optional leading article) (golint)
    • Line 14: warning: exported method CoapOption.GetValue should have comment or be unexported (golint)
    • Line 18: warning: exported method CoapOption.GetCode should have comment or be unexported (golint)
    • Line 22: warning: exported method CoapOption.Name should have comment or be unexported (golint)
    • Line 26: warning: comment on exported method CoapOption.IsElective should be of the form "IsElective ..." (golint)
    • Line 34: warning: comment on exported method CoapOption.IsCritical should be of the form "IsCritical ..." (golint)
    • Line 42: warning: comment on exported method CoapOption.StringValue should be of the form "StringValue ..." (golint)
    • Line 47: warning: exported method CoapOption.IntValue should have comment or be unexported (golint)
    • Line 51: warning: comment on exported function NewOption should be of the form "NewOption ..." (golint)
    • Line 59: warning: comment on exported function NewPathOptions should be of the form "NewPathOptions ..." (golint)
    • Line 73: warning: comment on exported function IsRepeatableOption should be of the form "IsRepeatableOption ..." (golint)
    • Line 87: warning: comment on exported function IsValidOption should be of the form "IsValidOption ..." (golint)
    • Line 102: warning: comment on exported function IsElectiveOption should be of the form "IsElectiveOption ..." (golint)
    • Line 112: warning: comment on exported function IsCriticalOption should be of the form "IsCriticalOption ..." (golint)
    • Line 117: warning: exported function NewBlock1Option should have comment or be unexported (golint)
    • Line 149: warning: exported function Block1OptionFromOption should have comment or be unexported (golint)
    • Line 158: warning: exported type Block1Option should have comment or be unexported (golint)
    • Line 162: warning: exported method Block1Option.Sequence should have comment or be unexported (golint)
    • Line 168: warning: exported method Block1Option.Exponent should have comment or be unexported (golint)
    • Line 174: warning: exported method Block1Option.BlockSizeLength should have comment or be unexported (golint)
    • Line 180: warning: exported method Block1Option.Size should have comment or be unexported (golint)
    • Line 187: warning: exported method Block1Option.HasMore should have comment or be unexported (golint)
    • canopus/types.go
    • Line 3: warning: exported type CoreAttributes should have comment or be unexported (golint)
    • Line 5: warning: exported type CoreResource should have comment or be unexported (golint)
    • Line 10: warning: exported type CoreAttribute should have comment or be unexported (golint)
    • Line 15: warning: comment on exported method CoreResource.AddAttribute should be of the form "AddAttribute ..." (golint)
    • Line 20: warning: comment on exported method CoreResource.GetAttribute should be of the form "GetAttribute ..." (golint)
    • canopus/request.go
    • Line 8: warning: comment on exported function NewRequest should be of the form "NewRequest ..." (golint)
    • Line 13: warning: exported function NewRequestWithMessageId should have comment or be unexported (golint)
    • Line 20: warning: exported function NewConfirmableGetRequest should have comment or be unexported (golint)
    • Line 26: warning: exported function NewConfirmablePostRequest should have comment or be unexported (golint)
    • Line 32: warning: exported function NewConfirmablePutRequest should have comment or be unexported (golint)
    • Line 38: warning: exported function NewConfirmableDeleteRequest should have comment or be unexported (golint)
    • Line 44: warning: comment on exported function NewRequestFromMessage should be of the form "NewRequestFromMessage ..." (golint)
    • Line 51: warning: exported function NewClientRequestFromMessage should have comment or be unexported (golint)
    • Line 59: warning: comment on exported type CoapRequest should be of the form "CoapRequest ..." (with optional leading article) (golint)
    • Line 68: warning: exported method CoapRequest.SetProxyURI should have comment or be unexported (golint)
    • Line 72: warning: exported method CoapRequest.SetMediaType should have comment or be unexported (golint)
    • Line 76: warning: exported method CoapRequest.GetSession should have comment or be unexported (golint)
    • Line 80: warning: exported method CoapRequest.GetAttributes should have comment or be unexported (golint)
    • Line 84: warning: exported method CoapRequest.GetAttribute should have comment or be unexported (golint)
    • Line 88: warning: exported method CoapRequest.GetAttributeAsInt should have comment or be unexported (golint)
    • Line 95: warning: exported method CoapRequest.GetMessage should have comment or be unexported (golint)
    • Line 99: warning: exported method CoapRequest.SetStringPayload should have comment or be unexported (golint)
    • Line 103: warning: exported method CoapRequest.SetPayload should have comment or be unexported (golint)
    • Line 107: warning: exported method CoapRequest.SetRequestURI should have comment or be unexported (golint)
    • Line 111: warning: exported method CoapRequest.SetConfirmable should have comment or be unexported (golint)
    • Line 119: warning: exported method CoapRequest.SetToken should have comment or be unexported (golint)
    • Line 123: warning: exported method CoapRequest.GetURIQuery should have comment or be unexported (golint)
    • Line 137: warning: exported method CoapRequest.SetURIQuery should have comment or be unexported (golint)
    • canopus/bytecontent.go
    • Line 3: warning: comment on exported function NewBytesPayload should be of the form "NewBytesPayload ..." (golint)
    • Line 10: warning: exported type BytesPayload should have comment or be unexported (golint)
    • Line 14: warning: exported method BytesPayload.GetBytes should have comment or be unexported (golint)
    • Line 18: warning: exported method BytesPayload.Length should have comment or be unexported (golint)
    • canopus/canopus.go
    • Line 13: warning: exported var MESSAGEID_MUTEX should have comment or be unexported (golint)
    • Line 23: warning: exported var GENERATE_ID should have comment or be unexported (golint)
    • Line 25: warning: exported const UDP should have comment or be unexported (golint)
    • Line 54: warning: exported const OptionURIHost should have comment (or a comment on this block) or be unexported (golint)
    • Line 78: warning: exported const Get should have comment (or a comment on this block) or be unexported (golint)
    • Line 83: warning: comment on exported const CoapCodeEmpty should be of the form "CoapCodeEmpty ..." (golint)
    • Line 92: warning: comment on exported const CoapCodeBadRequest should be of the form "CoapCodeBadRequest ..." (golint)
    • Line 106: warning: comment on exported const CoapCodeInternalServerError should be of the form "CoapCodeInternalServerError ..." (golint)
    • Line 115: warning: exported const DefaultAckTimeout should have comment or be unexported (golint)
    • Line 116: warning: exported const DefaultAckRandomFactor should have comment or be unexported (golint)
    • Line 117: warning: exported const DefaultMaxRetransmit should have comment or be unexported (golint)
    • Line 118: warning: exported const DefaultNStart should have comment or be unexported (golint)
    • Line 119: warning: exported const DefaultLeisure should have comment or be unexported (golint)
    • Line 120: warning: exported const DefaultProbingRate should have comment or be unexported (golint)
    • Line 122: warning: exported const CoapDefaultHost should have comment or be unexported (golint)
    • Line 123: warning: exported const CoapDefaultPort should have comment or be unexported (golint)
    • Line 124: warning: exported const CoapsDefaultPort should have comment or be unexported (golint)
    • Line 126: warning: exported const PayloadMarker should have comment or be unexported (golint)
    • Line 127: warning: exported const MaxPacketSize should have comment or be unexported (golint)
    • Line 132: warning: exported type RouteHandler should have comment or be unexported (golint)
    • Line 134: warning: comment on exported type ProxyFilter should be of the form "ProxyFilter ..." (with optional leading article) (golint)
    • Line 136: warning: exported type ProxyHandler should have comment or be unexported (golint)
    • Line 138: warning: exported type MediaType should have comment or be unexported (golint)
    • Line 141: warning: exported const MediaTypeTextPlain should have comment (or a comment on this block) or be unexported (golint)
    • Line 170: warning: exported const MethodGet should have comment (or a comment on this block) or be unexported (golint)
    • Line 178: warning: exported type BlockSizeType should have comment or be unexported (golint)
    • Line 181: warning: exported const BlockSize16 should have comment (or a comment on this block) or be unexported (golint)
    • Line 190: warning: comment on exported var ErrPacketLengthLessThan4 should be of the form "ErrPacketLengthLessThan4 ..." (golint)
    • Line 192: warning: exported var ErrInvalidCoapVersion should have comment or be unexported (golint)
    • Line 193: warning: exported var ErrOptionLengthUsesValue15 should have comment or be unexported (golint)
    • Line 194: warning: exported var ErrOptionDeltaUsesValue15 should have comment or be unexported (golint)
    • Line 195: warning: exported var ErrUnknownMessageType should have comment or be unexported (golint)
    • Line 196: warning: exported var ErrInvalidTokenLength should have comment or be unexported (golint)
    • Line 197: warning: exported var ErrUnknownCriticalOption should have comment or be unexported (golint)
    • Line 198: warning: exported var ErrUnsupportedMethod should have comment or be unexported (golint)
    • Line 199: warning: exported var ErrNoMatchingRoute should have comment or be unexported (golint)
    • Line 200: warning: exported var ErrUnsupportedContentFormat should have comment or be unexported (golint)
    • Line 201: warning: exported var ErrNoMatchingMethod should have comment or be unexported (golint)
    • Line 202: warning: exported var ErrNilMessage should have comment or be unexported (golint)
    • Line 203: warning: exported var ErrNilConn should have comment or be unexported (golint)
    • Line 204: warning: exported var ErrNilAddr should have comment or be unexported (golint)
    • Line 205: warning: exported var ErrMessageSizeTooLongBlockOptionValNotSet should have comment or be unexported (golint)
    • Line 215: warning: comment on exported type CoapServer should be of the form "CoapServer ..." (with optional leading article) (golint)
    • Line 263: warning: exported type ServerConnection should have comment or be unexported (golint)
    • Line 273: warning: exported type Option should have comment or be unexported (golint)
    • Line 283: warning: exported type Session should have comment or be unexported (golint)
    • Line 292: warning: exported type Request should have comment or be unexported (golint)
    • Line 309: warning: exported type Response should have comment or be unexported (golint)
    • Line 316: warning: exported type Connection should have comment or be unexported (golint)
    • Line 328: warning: comment on exported type MessagePayload should be of the form "MessagePayload ..." (with optional leading article) (golint)
    • Line 335: warning: exported type Message should have comment or be unexported (golint)
    • Line 367: warning: exported type Route should have comment or be unexported (golint)
    • Line 377: warning: exported type FnEventNotify should have comment or be unexported (golint)
    • Line 378: warning: exported type FnEventStart should have comment or be unexported (golint)
    • Line 379: warning: exported type FnEventClose should have comment or be unexported (golint)
    • Line 380: warning: exported type FnEventDiscover should have comment or be unexported (golint)
    • Line 381: warning: exported type FnEventError should have comment or be unexported (golint)
    • Line 382: warning: exported type FnEventObserve should have comment or be unexported (golint)
    • Line 383: warning: exported type FnEventObserveCancel should have comment or be unexported (golint)
    • Line 384: warning: exported type FnEventMessage should have comment or be unexported (golint)
    • Line 385: warning: exported type FnEventBlockMessage should have comment or be unexported (golint)
    • Line 387: warning: exported type EventCode should have comment or be unexported (golint)
    • Line 390: warning: exported const EventStart should have comment (or a comment on this block) or be unexported (golint)
    • Line 400: warning: exported type ObserveMessage should have comment or be unexported (golint)
    • Line 406: warning: exported type Events should have comment or be unexported (golint)
    • Line 428: warning: exported type BlockMessage should have comment or be unexported (golint)
    • canopus/conn.go
    • Line 9: warning: exported function MessageSizeAllowed should have comment or be unexported (golint)
    • Line 20: warning: exported type UDPConnection should have comment or be unexported (golint)
    • Line 24: warning: exported method UDPConnection.ObserveResource should have comment or be unexported (golint)
    • Line 35: warning: exported method UDPConnection.CancelObserveResource should have comment or be unexported (golint)
    • Line 44: warning: exported method UDPConnection.StopObserve should have comment or be unexported (golint)
    • Line 48: warning: exported method UDPConnection.Close should have comment or be unexported (golint)
    • Line 52: warning: exported method UDPConnection.Observe should have comment or be unexported (golint)
    • Line 76: warning: exported method UDPConnection.Send should have comment or be unexported (golint)
    • Line 94: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 153: warning: exported method UDPConnection.SendMessage should have comment or be unexported (golint)
    • canopus/empty.go
    • Line 3: warning: exported function NewEmptyPayload should have comment or be unexported (golint)
    • Line 7: warning: comment on exported type EmptyPayload should be of the form "EmptyPayload ..." (with optional leading article) (golint)
    • Line 11: warning: exported method EmptyPayload.GetBytes should have comment or be unexported (golint)
    • Line 15: warning: exported method EmptyPayload.Length should have comment or be unexported (golint)
    • canopus/message.go
    • Line 12: warning: comment on exported function NewMessage should be of the form "NewMessage ..." (golint)
    • Line 25: warning: comment on exported function NewEmptyMessage should be of the form "NewEmptyMessage ..." (golint)
    • Line 32: warning: comment on exported function NewMessageOfType should be of the form "NewMessageOfType ..." (golint)
    • Line 55: warning: comment on exported function BytesToMessage should be of the form "BytesToMessage ..." (golint)
    • Line 191: warning: comment on exported type SortOptions should be of the form "SortOptions ..." (with optional leading article) (golint)
    • Line 206: warning: comment on exported function MessageToBytes should be of the form "MessageToBytes ..." (golint)
    • Line 279: warning: comment on exported function ValidateMessage should be of the form "ValidateMessage ..." (golint)
    • Line 305: warning: exported function NewBlockMessage should have comment or be unexported (golint)
    • Line 311: warning: exported type CoapBlockMessage should have comment or be unexported (golint)
    • Line 317: warning: exported type BySequence should have comment or be unexported (golint)
    • Line 331: warning: comment on exported type CoapMessage should be of the form "CoapMessage ..." (with optional leading article) (golint)
    • Line 341: warning: exported method CoapMessage.SetMessageType should have comment or be unexported (golint)
    • Line 345: warning: exported method CoapMessage.SetToken should have comment or be unexported (golint)
    • Line 349: warning: exported method CoapMessage.SetPayload should have comment or be unexported (golint)
    • Line 353: warning: exported method CoapMessage.SetMessageId should have comment or be unexported (golint)
    • Line 357: warning: exported method CoapMessage.GetToken should have comment or be unexported (golint)
    • Line 361: warning: exported method CoapMessage.GetPayload should have comment or be unexported (golint)
    • Line 365: warning: exported method CoapMessage.GetMessageType should have comment or be unexported (golint)
    • Line 369: warning: exported method CoapMessage.GetMessageId should have comment or be unexported (golint)
    • Line 373: warning: exported method CoapMessage.GetCode should have comment or be unexported (golint)
    • Line 377: warning: exported method CoapMessage.GetAllOptions should have comment or be unexported (golint)
    • Line 381: warning: exported method CoapMessage.GetAcceptedContent should have comment or be unexported (golint)
    • Line 387: warning: exported method CoapMessage.GetCodeString should have comment or be unexported (golint)
    • Line 394: warning: exported method CoapMessage.GetMethod should have comment or be unexported (golint)
    • Line 398: warning: exported method CoapMessage.GetTokenLength should have comment or be unexported (golint)
    • Line 402: warning: exported method CoapMessage.GetTokenString should have comment or be unexported (golint)
    • Line 406: warning: comment on exported method CoapMessage.GetOptions should be of the form "GetOptions ..." (golint)
    • Line 417: warning: comment on exported method CoapMessage.GetOption should be of the form "GetOption ..." (golint)
    • Line 427: warning: comment on exported method CoapMessage.GetOptionsAsString should be of the form "GetOptionsAsString ..." (golint)
    • Line 440: warning: comment on exported method CoapMessage.GetLocationPath should be of the form "GetLocationPath ..." (golint)
    • Line 447: warning: comment on exported method CoapMessage.GetURIPath should be of the form "GetURIPath ..." (golint)
    • Line 454: warning: comment on exported method CoapMessage.AddOption should be of the form "AddOption ..." (golint)
    • Line 466: warning: comment on exported method CoapMessage.AddOptions should be of the form "AddOptions ..." (golint)
    • Line 479: warning: exported method CoapMessage.SetBlock1Option should have comment or be unexported (golint)
    • Line 479: warning: receiver name c should be consistent with previous receiver name m for CoapMessage (golint)
    • Line 483: warning: comment on exported method CoapMessage.CloneOptions should be of the form "CloneOptions ..." (golint)
    • Line 490: warning: comment on exported method CoapMessage.ReplaceOptions should be of the form "ReplaceOptions ..." (golint)
    • Line 497: warning: comment on exported method CoapMessage.RemoveOptions should be of the form "RemoveOptions ..." (golint)
    • Line 508: warning: comment on exported method CoapMessage.SetStringPayload should be of the form "SetStringPayload ..." (golint)
    • Line 513: warning: comment on exported function IsProxyRequest should be of the form "IsProxyRequest ..." (golint)
    • Line 580: warning: comment on exported function IsCoapURI should be of the form "IsCoapURI ..." (golint)
    • Line 588: warning: comment on exported function IsHTTPURI should be of the form "IsHTTPURI ..." (golint)
    • Line 597: warning: comment on exported function MethodString should be of the form "MethodString ..." (golint)
    • Line 615: warning: comment on exported function EmptyMessage should be of the form "EmptyMessage ..." (golint)
    • Line 621: warning: comment on exported function CreatedMessage should be of the form "CreatedMessage ..." (golint)
    • Line 626: warning: comment on exported function DeletedMessage should be of the form "DeletedMessage ..." (golint)
    • Line 631: warning: comment on exported function ValidMessage should be of the form "ValidMessage ..." (golint)
    • Line 636: warning: comment on exported function ChangedMessage should be of the form "ChangedMessage ..." (golint)
    • Line 641: warning: comment on exported function ContentMessage should be of the form "ContentMessage ..." (golint)
    • Line 646: warning: comment on exported function BadRequestMessage should be of the form "BadRequestMessage ..." (golint)
    • Line 651: warning: exported function ContinueMessage should have comment or be unexported (golint)
    • Line 655: warning: comment on exported function UnauthorizedMessage should be of the form "UnauthorizedMessage ..." (golint)
    • Line 660: warning: comment on exported function BadOptionMessage should be of the form "BadOptionMessage ..." (golint)
    • Line 665: warning: comment on exported function ForbiddenMessage should be of the form "ForbiddenMessage ..." (golint)
    • Line 670: warning: comment on exported function NotFoundMessage should be of the form "NotFoundMessage ..." (golint)
    • Line 678: warning: comment on exported function MethodNotAllowedMessage should be of the form "MethodNotAllowedMessage ..." (golint)
    • Line 683: warning: comment on exported function NotAcceptableMessage should be of the form "NotAcceptableMessage ..." (golint)
    • Line 688: warning: comment on exported function ConflictMessage should be of the form "ConflictMessage ..." (golint)
    • Line 693: warning: comment on exported function PreconditionFailedMessage should be of the form "PreconditionFailedMessage ..." (golint)
    • Line 698: warning: comment on exported function RequestEntityTooLargeMessage should be of the form "RequestEntityTooLargeMessage ..." (golint)
    • Line 703: warning: comment on exported function UnsupportedContentFormatMessage should be of the form "UnsupportedContentFormatMessage ..." (golint)
    • Line 708: warning: comment on exported function InternalServerErrorMessage should be of the form "InternalServerErrorMessage ..." (golint)
    • Line 713: warning: comment on exported function NotImplementedMessage should be of the form "NotImplementedMessage ..." (golint)
    • Line 718: warning: comment on exported function BadGatewayMessage should be of the form "BadGatewayMessage ..." (golint)
    • Line 723: warning: comment on exported function ServiceUnavailableMessage should be of the form "ServiceUnavailableMessage ..." (golint)
    • Line 728: warning: comment on exported function GatewayTimeoutMessage should be of the form "GatewayTimeoutMessage ..." (golint)
    • Line 733: warning: comment on exported function ProxyingNotSupportedMessage should be of the form "ProxyingNotSupportedMessage ..." (golint)
    • canopus/plaintext.go
    • Line 5: warning: comment on exported function NewPlainTextPayload should be of the form "NewPlainTextPayload ..." (golint)
    • Line 12: warning: comment on exported type PlainTextPayload should be of the form "PlainTextPayload ..." (with optional leading article) (golint)
    • Line 17: warning: exported method PlainTextPayload.GetBytes should have comment or be unexported (golint)
    • Line 21: warning: exported method PlainTextPayload.Length should have comment or be unexported (golint)
    • canopus/proxy.go
    • Line 11: warning: exported function NullProxyFilter should have comment or be unexported (golint)
    • Line 15: warning: comment on exported function NullProxyHandler should be of the form "NullProxyHandler ..." (golint)
    • Line 20: warning: exported function COAPProxyHandler should have comment or be unexported (golint)
    • Line 51: warning: comment on exported function HTTPProxyHandler should be of the form "HTTPProxyHandler ..." (golint)
    • Line 101: warning: comment on exported function HTTPCOAPProxyHandler should be of the form "HTTPCOAPProxyHandler ..." (golint)
    • canopus/response.go
    • Line 7: warning: exported function NoResponse should have comment or be unexported (golint)
    • Line 11: warning: exported type NilResponse should have comment or be unexported (golint)
    • Line 14: warning: exported method NilResponse.GetMessage should have comment or be unexported (golint)
    • Line 18: warning: exported method NilResponse.GetError should have comment or be unexported (golint)
    • Line 22: warning: exported method NilResponse.GetPayload should have comment or be unexported (golint)
    • Line 26: warning: exported method NilResponse.GetURIQuery should have comment or be unexported (golint)
    • Line 30: warning: comment on exported function NewResponse should be of the form "NewResponse ..." (golint)
    • Line 40: warning: comment on exported function NewResponseWithMessage should be of the form "NewResponseWithMessage ..." (golint)
    • Line 49: warning: exported type DefaultResponse should have comment or be unexported (golint)
    • Line 54: warning: exported method DefaultResponse.GetMessage should have comment or be unexported (golint)
    • Line 58: warning: exported method DefaultResponse.GetError should have comment or be unexported (golint)
    • Line 62: warning: exported method DefaultResponse.GetPayload should have comment or be unexported (golint)
    • Line 66: warning: exported method DefaultResponse.GetURIQuery should have comment or be unexported (golint)
    • canopus/server.go
    • Line 12: warning: exported var NEXT_SESSION_ID should have comment or be unexported (golint)
    • Line 14: warning: exported type ServerConfiguration should have comment or be unexported (golint)
    • Line 18: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 39: warning: exported type DefaultCoapServer should have comment or be unexported (golint)
    • Line 65: warning: exported method DefaultCoapServer.DeleteSession should have comment or be unexported (golint)
    • Line 69: warning: exported method DefaultCoapServer.HandlePSK should have comment or be unexported (golint)
    • Line 245: warning: exported method DefaultCoapServer.GetEvents should have comment or be unexported (golint)
    • Line 288: warning: exported method DefaultCoapServer.ListenAndServeDTLS should have comment or be unexported (golint)
    • Line 314: warning: exported method DefaultCoapServer.ListenAndServe should have comment or be unexported (golint)
    • Line 390: warning: exported method DefaultCoapServer.GetSession should have comment or be unexported (golint)
    • Line 394: warning: exported method DefaultCoapServer.Stop should have comment or be unexported (golint)
    • Line 442: warning: exported method DefaultCoapServer.SetProxyFilter should have comment or be unexported (golint)
    • Line 446: warning: exported method DefaultCoapServer.GetCookieSecret should have comment or be unexported (golint)
    • Line 471: warning: exported method DefaultCoapServer.Get should have comment or be unexported (golint)
    • Line 475: warning: exported method DefaultCoapServer.Delete should have comment or be unexported (golint)
    • Line 479: warning: exported method DefaultCoapServer.Put should have comment or be unexported (golint)
    • Line 483: warning: exported method DefaultCoapServer.Post should have comment or be unexported (golint)
    • Line 487: warning: exported method DefaultCoapServer.Options should have comment or be unexported (golint)
    • Line 491: warning: exported method DefaultCoapServer.Patch should have comment or be unexported (golint)
    • Line 502: warning: exported method DefaultCoapServer.NewRoute should have comment or be unexported (golint)
    • Line 515: warning: exported method DefaultCoapServer.NotifyChange should have comment or be unexported (golint)
    • Line 539: warning: exported method DefaultCoapServer.AddObservation should have comment or be unexported (golint)
    • Line 543: warning: exported method DefaultCoapServer.HasObservation should have comment or be unexported (golint)
    • Line 557: warning: exported method DefaultCoapServer.RemoveObservation should have comment or be unexported (golint)
    • Line 571: warning: exported method DefaultCoapServer.OnNotify should have comment or be unexported (golint)
    • Line 575: warning: exported method DefaultCoapServer.OnStart should have comment or be unexported (golint)
    • Line 579: warning: exported method DefaultCoapServer.OnClose should have comment or be unexported (golint)
    • Line 583: warning: exported method DefaultCoapServer.OnDiscover should have comment or be unexported (golint)
    • Line 587: warning: exported method DefaultCoapServer.OnError should have comment or be unexported (golint)
    • Line 591: warning: exported method DefaultCoapServer.OnObserve should have comment or be unexported (golint)
    • Line 595: warning: exported method DefaultCoapServer.OnObserveCancel should have comment or be unexported (golint)
    • Line 599: warning: exported method DefaultCoapServer.OnMessage should have comment or be unexported (golint)
    • Line 603: warning: exported method DefaultCoapServer.OnBlockMessage should have comment or be unexported (golint)
    • Line 607: warning: exported method DefaultCoapServer.ProxyOverHttp should have comment or be unexported (golint)
    • Line 615: warning: exported method DefaultCoapServer.ProxyOverCoap should have comment or be unexported (golint)
    • Line 623: warning: exported method DefaultCoapServer.AllowProxyForwarding should have comment or be unexported (golint)
    • Line 627: warning: exported method DefaultCoapServer.ForwardCoap should have comment or be unexported (golint)
    • Line 631: warning: exported method DefaultCoapServer.ForwardHTTP should have comment or be unexported (golint)
    • Line 635: warning: exported method DefaultCoapServer.GetRoutes should have comment or be unexported (golint)
    • Line 736: warning: exported function NewResponseChannel should have comment or be unexported (golint)
    • Line 742: warning: exported function AddResponseChannel should have comment or be unexported (golint)
    • Line 747: warning: exported function DeleteResponseChannel should have comment or be unexported (golint)
    • Line 752: warning: exported function GetResponseChannel should have comment or be unexported (golint)
    • Line 759: warning: exported function NewObservation should have comment or be unexported (golint)
    • Line 768: warning: exported type Observation should have comment or be unexported (golint)
    • Line 797: warning: exported function SendMessage should have comment or be unexported (golint)
    • Line 818: warning: exported type CoapResponseChannel should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign68%

IneffAssign detects ineffectual assignments in Go code.

    • canopus/examples/simple/client.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/thingspin/canopus (invalid package name: "") (ineffassign)
    • Line 9: warning: other declaration of main (ineffassign)
    • canopus/examples/proxy/coap/client.go
    • Line 3: warning: cannot find package "." in: (ineffassign)
    • Line 3: warning: could not import github.com/thingspin/canopus (invalid package name: "") (ineffassign)
    • Line 5: warning: other declaration of main (ineffassign)
    • Line 5: warning: other declaration of main (ineffassign)

misspell88%

Misspell Finds commonly misspelled English words

    • canopus/server.go
    • Line 103: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 299: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 320: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 383: warning: "occured" is a misspelling of "occurred" (misspell)
    • canopus/conn.go
    • Line 66: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 70: warning: "occured" is a misspelling of "occurred" (misspell)