Preparing report...

Report for github.com/jointwt/twtxt

A+    Excellent!    Found 58 issues across 94 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!


golint47%

Golint is a linter for Go source code.

    • twtxt/internal/session/session.go
    • Line 21: warning: exported function NewSession should have comment or be unexported (golint)
    • Line 25: warning: exported function LoadSession should have comment or be unexported (golint)
    • Line 37: warning: exported method Session.Expired should have comment or be unexported (golint)
    • Line 41: warning: exported method Session.Set should have comment or be unexported (golint)
    • Line 46: warning: exported method Session.Get should have comment or be unexported (golint)
    • Line 51: warning: exported method Session.Has should have comment or be unexported (golint)
    • Line 56: warning: exported method Session.Del should have comment or be unexported (golint)
    • Line 61: warning: exported method Session.Bytes should have comment or be unexported (golint)
    • twtxt/internal/func_task.go
    • Line 5: warning: exported type FuncTask should have comment or be unexported (golint)
    • Line 11: warning: exported function NewFuncTask should have comment or be unexported (golint)
    • Line 20: warning: exported method FuncTask.Run should have comment or be unexported (golint)
    • twtxt/internal/translator.go
    • Line 14: warning: exported type Translator should have comment or be unexported (golint)
    • Line 18: warning: exported function NewTranslator should have comment or be unexported (golint)
    • twtxt/types/twt.go
    • Line 17: warning: exported const TwtHashLength should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported method Twter.IsZero should have comment or be unexported (golint)
    • Line 33: warning: exported method Twter.MarshalJSON should have comment or be unexported (golint)
    • Line 48: warning: exported method Twter.Domain should have comment or be unexported (golint)
    • Line 57: warning: exported method Twter.DomainNick should have comment or be unexported (golint)
    • Line 92: warning: exported type TwtMention should have comment or be unexported (golint)
    • Line 96: warning: exported type MentionList should have comment or be unexported (golint)
    • Line 98: warning: exported method MentionList.Mentions should have comment or be unexported (golint)
    • Line 106: warning: exported type TwtTag should have comment or be unexported (golint)
    • Line 111: warning: exported type TagList should have comment or be unexported (golint)
    • Line 113: warning: exported method TagList.Tags should have comment or be unexported (golint)
    • Line 124: warning: exported type TwtLink should have comment or be unexported (golint)
    • Line 129: warning: exported type LinkList should have comment or be unexported (golint)
    • Line 131: warning: exported method LinkList.Links should have comment or be unexported (golint)
    • Line 139: warning: exported type Subject should have comment or be unexported (golint)
    • Line 171: warning: exported method Twts.TagCount should have comment or be unexported (golint)
    • Line 193: warning: exported method Twts.MentionCount should have comment or be unexported (golint)
    • Line 211: warning: exported method Twts.LinkCount should have comment or be unexported (golint)
    • Line 230: warning: exported method Twts.SubjectCount should have comment or be unexported (golint)
    • Line 238: warning: exported method Twts.Clone should have comment or be unexported (golint)
    • Line 246: warning: exported method Twts.UnmarshalJSON should have comment or be unexported (golint)
    • Line 266: warning: exported type FmtOpts should have comment or be unexported (golint)
    • Line 287: warning: exported var NilTwt should have comment or be unexported (golint)
    • Line 321: warning: exported type TwtManager should have comment or be unexported (golint)
    • Line 344: warning: exported var ErrNotImplemented should have comment or be unexported (golint)
    • Line 350: warning: exported function DecodeJSON should have comment or be unexported (golint)
    • Line 351: warning: exported function ParseLine should have comment or be unexported (golint)
    • Line 354: warning: exported function ParseFile should have comment or be unexported (golint)
    • Line 357: warning: exported function MakeTwt should have comment or be unexported (golint)
    • Line 361: warning: exported function SetTwtManager should have comment or be unexported (golint)
    • Line 365: warning: exported type TwtFile should have comment or be unexported (golint)
    • Line 371: warning: exported type Info should have comment or be unexported (golint)
    • Line 376: warning: exported type KV should have comment or be unexported (golint)
    • Line 382: warning: exported type Value should have comment or be unexported (golint)
    • Line 407: warning: exported type FeedLookup should have comment or be unexported (golint)
    • Line 411: warning: exported type FeedLookupFn should have comment or be unexported (golint)
    • Line 413: warning: exported method FeedLookupFn.FeedLookup should have comment or be unexported (golint)
    • Line 415: warning: exported function NormalizeUsername should have comment or be unexported (golint)
    • Line 419: warning: exported type PreambleFeed should have comment or be unexported (golint)
    • Line 425: warning: exported method PreambleFeed.Preamble should have comment or be unexported (golint)
    • Line 449: warning: exported function ReadPreambleFeed should have comment or be unexported (golint)
    • twtxt/types/retwt/retwt.go
    • Line 82: warning: exported function NewReTwt should have comment or be unexported (golint)
    • Line 89: warning: exported function DecodeJSON should have comment or be unexported (golint)
    • Line 97: warning: exported function ParseLine should have comment or be unexported (golint)
    • Line 129: warning: exported function ParseFile should have comment or be unexported (golint)
    • Line 396: warning: exported function ParseTime should have comment or be unexported (golint)
    • Line 417: warning: exported var ErrInvalidTwtLine should have comment or be unexported (golint)
    • Line 433: warning: exported function DefaultTwtManager should have comment or be unexported (golint)
    • Line 499: warning: comment on exported function ExpandTag should be of the form "ExpandTag ..." (golint)
    • twtxt/internal/email.go
    • Line 15: warning: exported var ErrSendingEmail should have comment or be unexported (golint)
    • Line 64: warning: exported type PasswordResetEmailContext should have comment or be unexported (golint)
    • Line 72: warning: exported type SupportRequestEmailContext should have comment or be unexported (golint)
    • Line 82: warning: exported type ReportAbuseEmailContext should have comment or be unexported (golint)
    • Line 95: warning: comment on exported function Indent should be of the form "Indent ..." (golint)
    • Line 111: warning: exported function SendEmail should have comment or be unexported (golint)
    • Line 130: warning: exported function SendPasswordResetEmail should have comment or be unexported (golint)
    • Line 158: warning: exported function SendSupportRequestEmail should have comment or be unexported (golint)
    • Line 188: warning: exported function SendReportAbuseEmail should have comment or be unexported (golint)
    • twtxt/internal/models.go
    • Line 24: warning: exported var ErrFeedAlreadyExists should have comment or be unexported (golint)
    • Line 83: warning: exported function LoadToken should have comment or be unexported (golint)
    • Line 96: warning: exported method Token.Bytes should have comment or be unexported (golint)
    • Line 104: warning: exported function CreateFeed should have comment or be unexported (golint)
    • Line 152: warning: exported function DetachFeedFromOwner should have comment or be unexported (golint)
    • Line 169: warning: exported function RemoveFeedOwnership should have comment or be unexported (golint)
    • Line 178: warning: exported function AddFeedOwnership should have comment or be unexported (golint)
    • Line 231: warning: exported function LoadUser should have comment or be unexported (golint)
    • Line 285: warning: exported method Feed.AddFollower should have comment or be unexported (golint)
    • Line 291: warning: exported method Feed.FollowedBy should have comment or be unexported (golint)
    • Line 296: warning: exported method Feed.Source should have comment or be unexported (golint)
    • Line 302: warning: exported method Feed.Profile should have comment or be unexported (golint)
    • Line 336: warning: exported method Feed.Bytes should have comment or be unexported (golint)
    • Line 353: warning: comment on exported method User.AddToken should be of the form "AddToken ..." (golint)
    • Line 370: warning: exported method User.OwnsFeed should have comment or be unexported (golint)
    • Line 380: warning: exported method User.Is should have comment or be unexported (golint)
    • Line 387: warning: exported method User.Bookmark should have comment or be unexported (golint)
    • Line 395: warning: exported method User.Bookmarked should have comment or be unexported (golint)
    • Line 400: warning: exported method User.AddFollower should have comment or be unexported (golint)
    • Line 406: warning: exported method User.FollowedBy should have comment or be unexported (golint)
    • Line 411: warning: exported method User.Mute should have comment or be unexported (golint)
    • Line 418: warning: exported method User.Unmute should have comment or be unexported (golint)
    • Line 426: warning: exported method User.Follow should have comment or be unexported (golint)
    • Line 433: warning: exported method User.FollowAndValidate should have comment or be unexported (golint)
    • Line 448: warning: exported method User.Follows should have comment or be unexported (golint)
    • Line 453: warning: exported method User.HasMuted should have comment or be unexported (golint)
    • Line 458: warning: exported method User.Source should have comment or be unexported (golint)
    • Line 464: warning: exported method User.Sources should have comment or be unexported (golint)
    • Line 473: warning: exported method User.Profile should have comment or be unexported (golint)
    • Line 524: warning: exported method User.Twter should have comment or be unexported (golint)
    • Line 528: warning: exported method User.Filter should have comment or be unexported (golint)
    • Line 543: warning: exported method User.Reply should have comment or be unexported (golint)
    • Line 563: warning: exported method User.Bytes should have comment or be unexported (golint)
    • twtxt/internal/api.go
    • Line 31: warning: exported const TokenContextKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 882: warning: comment on exported method API.UploadMediaEndpoint should be of the form "UploadMediaEndpoint ..." (golint)
    • twtxt/internal/audio_task.go
    • Line 10: warning: exported type AudioTask should have comment or be unexported (golint)
    • Line 17: warning: exported function NewAudioTask should have comment or be unexported (golint)
    • Line 27: warning: exported method AudioTask.Run should have comment or be unexported (golint)
    • twtxt/internal/jobs.go
    • Line 17: warning: exported function NewJobSpec should have comment or be unexported (golint)
    • Line 22: warning: exported var Jobs should have comment or be unexported (golint)
    • Line 51: warning: exported type JobFactory should have comment or be unexported (golint)
    • Line 53: warning: exported type SyncStoreJob should have comment or be unexported (golint)
    • Line 61: warning: exported function NewSyncStoreJob should have comment or be unexported (golint)
    • Line 65: warning: exported method SyncStoreJob.Run should have comment or be unexported (golint)
    • Line 72: warning: exported type StatsJob should have comment or be unexported (golint)
    • Line 80: warning: exported function NewStatsJob should have comment or be unexported (golint)
    • Line 84: warning: exported method StatsJob.Run should have comment or be unexported (golint)
    • Line 149: warning: exported type UpdateFeedsJob should have comment or be unexported (golint)
    • Line 157: warning: exported function NewUpdateFeedsJob should have comment or be unexported (golint)
    • Line 161: warning: exported method UpdateFeedsJob.Run should have comment or be unexported (golint)
    • Line 222: warning: exported type UpdateFeedSourcesJob should have comment or be unexported (golint)
    • Line 230: warning: exported function NewUpdateFeedSourcesJob should have comment or be unexported (golint)
    • Line 234: warning: exported method UpdateFeedSourcesJob.Run should have comment or be unexported (golint)
    • Line 248: warning: exported type CreateAdminFeedsJob should have comment or be unexported (golint)
    • Line 256: warning: exported function NewCreateAdminFeedsJob should have comment or be unexported (golint)
    • Line 260: warning: exported method CreateAdminFeedsJob.Run should have comment or be unexported (golint)
    • Line 288: warning: exported type CreateBotsJob should have comment or be unexported (golint)
    • Line 296: warning: exported function NewCreateBotsJob should have comment or be unexported (golint)
    • Line 300: warning: exported method CreateBotsJob.Run should have comment or be unexported (golint)
    • Line 313: warning: exported type DeleteOldSessionsJob should have comment or be unexported (golint)
    • Line 321: warning: exported function NewDeleteOldSessionsJob should have comment or be unexported (golint)
    • Line 325: warning: exported method DeleteOldSessionsJob.Run should have comment or be unexported (golint)
    • Line 344: warning: exported type RemoveEmailsJob should have comment or be unexported (golint)
    • Line 352: warning: exported function NewRemoveEmailsJob should have comment or be unexported (golint)
    • Line 362: warning: exported method RemoveEmailsJob.Run should have comment or be unexported (golint)
    • twtxt/internal/options.go
    • Line 30: warning: comment on exported const DefaultAdminUser should be of the form "DefaultAdminUser ..." (golint)
    • Line 32: warning: exported const DefaultAdminName should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: comment on exported const DefaultMetaTitle should be of the form "DefaultMetaTitle ..." (golint)
    • Line 76: warning: comment on exported const DefaultMsgsPerPage should be of the form "DefaultMsgsPerPage ..." (golint)
    • Line 97: warning: comment on exported const DefaultSMTPBind should be of the form "DefaultSMTPBind ..." (golint)
    • Line 101: warning: comment on exported const DefaultSMTPHost should be of the form "DefaultSMTPHost ..." (golint)
    • Line 146: warning: exported function NewConfig should have comment or be unexported (golint)
    • twtxt/internal/twt.go
    • Line 23: warning: exported function DeleteLastTwt should have comment or be unexported (golint)
    • Line 46: warning: exported function AppendSpecial should have comment or be unexported (golint)
    • Line 52: warning: exported function AppendTwt should have comment or be unexported (golint)
    • Line 90: warning: exported function FeedExists should have comment or be unexported (golint)
    • Line 101: warning: exported function GetLastTwt should have comment or be unexported (golint)
    • Line 123: warning: exported function GetAllFeeds should have comment or be unexported (golint)
    • Line 143: warning: exported function GetFeedCount should have comment or be unexported (golint)
    • Line 162: warning: exported function GetAllTwts should have comment or be unexported (golint)
    • twtxt/internal/webmention/webmention.go
    • Line 1: warning: package comment should be of the form "Package webmention ..." (golint)
    • Line 16: warning: exported type WebMention should have comment or be unexported (golint)
    • Line 24: warning: exported function New should have comment or be unexported (golint)
    • Line 49: warning: exported method WebMention.GetTargetEndpoint should have comment or be unexported (golint)
    • Line 81: warning: exported method WebMention.SendNotification should have comment or be unexported (golint)
    • Line 85: warning: exported method WebMention.WebMentionEndpoint should have comment or be unexported (golint)
    • twtxt/internal/session_store.go
    • Line 18: warning: exported function NewSessionStore should have comment or be unexported (golint)
    • Line 25: warning: exported method SessionStore.Count should have comment or be unexported (golint)
    • Line 29: warning: exported method SessionStore.GetSession should have comment or be unexported (golint)
    • Line 38: warning: exported method SessionStore.SetSession should have comment or be unexported (golint)
    • Line 47: warning: exported method SessionStore.HasSession should have comment or be unexported (golint)
    • Line 56: warning: exported method SessionStore.DelSession should have comment or be unexported (golint)
    • Line 67: warning: exported method SessionStore.SyncSession should have comment or be unexported (golint)
    • Line 78: warning: exported method SessionStore.GetAllSessions should have comment or be unexported (golint)
    • twtxt/internal/utils.go
    • Line 74: warning: exported const DayAgo should have comment (or a comment on this block) or be unexported (golint)
    • Line 112: warning: exported var ErrInvalidFeedName should have comment or be unexported (golint)
    • Line 132: warning: exported function GenerateRandomToken should have comment or be unexported (golint)
    • Line 138: warning: exported function FastHash should have comment or be unexported (golint)
    • Line 148: warning: exported function IntPow should have comment or be unexported (golint)
    • Line 152: warning: exported function Slugify should have comment or be unexported (golint)
    • Line 162: warning: exported function GenerateAvatar should have comment or be unexported (golint)
    • Line 178: warning: exported function ReplaceExt should have comment or be unexported (golint)
    • Line 183: warning: exported function ImageToPng should have comment or be unexported (golint)
    • Line 216: warning: exported function GetExternalAvatar should have comment or be unexported (golint)
    • Line 265: warning: exported function Request should have comment or be unexported (golint)
    • Line 302: warning: exported function ResourceExists should have comment or be unexported (golint)
    • Line 313: warning: exported function LineCount should have comment or be unexported (golint)
    • Line 332: warning: exported function FileExists should have comment or be unexported (golint)
    • Line 408: warning: exported function IsExternalFeedFactory should have comment or be unexported (golint)
    • Line 420: warning: exported function IsLocalURLFactory should have comment or be unexported (golint)
    • Line 429: warning: exported function GetUserFromURL should have comment or be unexported (golint)
    • Line 440: warning: exported function WebMention should have comment or be unexported (golint)
    • Line 455: warning: exported function StringKeys should have comment or be unexported (golint)
    • Line 463: warning: exported function StringValues should have comment or be unexported (golint)
    • Line 471: warning: exported function MapStrings should have comment or be unexported (golint)
    • Line 479: warning: exported function HasString should have comment or be unexported (golint)
    • Line 488: warning: exported function UniqStrings should have comment or be unexported (golint)
    • Line 503: warning: exported function RemoveString should have comment or be unexported (golint)
    • Line 514: warning: exported function IsImage should have comment or be unexported (golint)
    • Line 535: warning: exported function IsAudio should have comment or be unexported (golint)
    • Line 556: warning: exported function IsVideo should have comment or be unexported (golint)
    • Line 577: warning: exported type ImageOptions should have comment or be unexported (golint)
    • Line 583: warning: exported type AudioOptions should have comment or be unexported (golint)
    • Line 590: warning: exported type VideoOptions should have comment or be unexported (golint)
    • Line 595: warning: exported function DownloadImage should have comment or be unexported (golint)
    • Line 632: warning: exported function ReceiveAudio should have comment or be unexported (golint)
    • Line 656: warning: exported function ReceiveImage should have comment or be unexported (golint)
    • Line 680: warning: exported function ReceiveVideo should have comment or be unexported (golint)
    • Line 704: warning: exported function TranscodeAudio should have comment or be unexported (golint)
    • Line 829: warning: exported function ProcessImage should have comment or be unexported (golint)
    • Line 906: warning: exported function TranscodeVideo should have comment or be unexported (golint)
    • Line 1088: warning: exported function StoreUploadedImage should have comment or be unexported (golint)
    • Line 1098: warning: exported function NormalizeFeedName should have comment or be unexported (golint)
    • Line 1105: warning: exported function ValidateFeed should have comment or be unexported (golint)
    • Line 1128: warning: exported function ValidateFeedName should have comment or be unexported (golint)
    • Line 1139: warning: exported type URI should have comment or be unexported (golint)
    • Line 1144: warning: exported method URI.IsZero should have comment or be unexported (golint)
    • Line 1152: warning: exported type TwtxtUserAgent should have comment or be unexported (golint)
    • Line 1158: warning: exported method TwtxtUserAgent.IsPublicURL should have comment or be unexported (golint)
    • Line 1193: warning: exported function DetectFollowerFromUserAgent should have comment or be unexported (golint)
    • Line 1206: warning: exported function ParseURI should have comment or be unexported (golint)
    • Line 1214: warning: exported function NormalizeUsername should have comment or be unexported (golint)
    • Line 1218: warning: exported function NormalizeURL should have comment or be unexported (golint)
    • Line 1257: warning: exported function HostnameFromURL should have comment or be unexported (golint)
    • Line 1267: warning: exported function PrettyURL should have comment or be unexported (golint)
    • Line 1285: warning: exported function UserURL should have comment or be unexported (golint)
    • Line 1292: warning: exported function URLForBlogs should have comment or be unexported (golint)
    • Line 1300: warning: exported function URLForPage should have comment or be unexported (golint)
    • Line 1308: warning: exported function URLForTwt should have comment or be unexported (golint)
    • Line 1316: warning: exported function URLForUser should have comment or be unexported (golint)
    • Line 1324: warning: exported function URLForAvatar should have comment or be unexported (golint)
    • Line 1332: warning: exported function URLForExternalProfile should have comment or be unexported (golint)
    • Line 1340: warning: exported function URLForExternalAvatar should have comment or be unexported (golint)
    • Line 1348: warning: exported function URLForBlogFactory should have comment or be unexported (golint)
    • Line 1378: warning: exported function URLForConvFactory should have comment or be unexported (golint)
    • Line 1411: warning: exported function URLForTag should have comment or be unexported (golint)
    • Line 1419: warning: exported function URLForTask should have comment or be unexported (golint)
    • Line 1427: warning: exported function URLForWhoFollows should have comment or be unexported (golint)
    • Line 1622: warning: exported function FormatForDateTime should have comment or be unexported (golint)
    • Line 1789: warning: exported function GetMediaNamesFromText should have comment or be unexported (golint)
    • Line 1813: warning: exported function NewFeedLookup should have comment or be unexported (golint)
    • twtxt/internal/blog.go
    • Line 27: warning: exported var ErrInvalidBlogPath should have comment or be unexported (golint)
    • Line 30: warning: exported type BlogPost should have comment or be unexported (golint)
    • Line 45: warning: exported type BlogPosts should have comment or be unexported (golint)
    • Line 57: warning: exported function GetBlogPostsByAuthor should have comment or be unexported (golint)
    • Line 96: warning: exported function GetAllBlogPosts should have comment or be unexported (golint)
    • Line 135: warning: exported function NewBlogPost should have comment or be unexported (golint)
    • Line 153: warning: exported function BlogPostFromFile should have comment or be unexported (golint)
    • Line 192: warning: exported function BlogPostFromParams should have comment or be unexported (golint)
    • Line 213: warning: exported method BlogPost.Created should have comment or be unexported (golint)
    • Line 218: warning: exported method BlogPost.Modified should have comment or be unexported (golint)
    • Line 222: warning: exported method BlogPost.Published should have comment or be unexported (golint)
    • Line 226: warning: exported method BlogPost.Draft should have comment or be unexported (golint)
    • Line 230: warning: exported method BlogPost.Filename should have comment or be unexported (golint)
    • Line 241: warning: exported method BlogPost.Reset should have comment or be unexported (golint)
    • Line 255: warning: exported method BlogPost.WriteString should have comment or be unexported (golint)
    • Line 262: warning: exported method BlogPost.Bytes should have comment or be unexported (golint)
    • Line 304: warning: exported method BlogPost.Load should have comment or be unexported (golint)
    • Line 318: warning: exported method BlogPost.Delete should have comment or be unexported (golint)
    • Line 334: warning: exported method BlogPost.Publish should have comment or be unexported (golint)
    • Line 338: warning: exported method BlogPost.Save should have comment or be unexported (golint)
    • Line 364: warning: exported method BlogPost.URL should have comment or be unexported (golint)
    • Line 372: warning: exported method BlogPost.Hash should have comment or be unexported (golint)
    • Line 387: warning: exported method BlogPost.Content should have comment or be unexported (golint)
    • Line 395: warning: exported function WriteBlog should have comment or be unexported (golint)
    • Line 420: warning: exported function WriteBlogAs should have comment or be unexported (golint)
    • twtxt/internal/config.go
    • Line 21: warning: exported var ErrConfigPathMissing should have comment or be unexported (golint)
    • Line 94: warning: exported method Config.IsLocalURL should have comment or be unexported (golint)
    • Line 100: warning: exported method Config.LocalURL should have comment or be unexported (golint)
    • Line 101: warning: exported method Config.ExternalURL should have comment or be unexported (golint)
    • Line 102: warning: exported method Config.UserURL should have comment or be unexported (golint)
    • Line 103: warning: exported method Config.URLForUser should have comment or be unexported (golint)
    • Line 104: warning: exported method Config.URLForTag should have comment or be unexported (golint)
    • twtxt/internal/image_task.go
    • Line 10: warning: exported type ImageTask should have comment or be unexported (golint)
    • Line 17: warning: exported function NewImageTask should have comment or be unexported (golint)
    • Line 27: warning: exported method ImageTask.Run should have comment or be unexported (golint)
    • twtxt/internal/store.go
    • Line 11: warning: exported var ErrInvalidStore should have comment or be unexported (golint)
    • Line 18: warning: exported type Store should have comment or be unexported (golint)
    • Line 53: warning: exported function NewStore should have comment or be unexported (golint)
    • twtxt/types/lextwt/parser.go
    • Line 30: warning: exported function NewParser should have comment or be unexported (golint)
    • Line 776: warning: exported type ListError should have comment or be unexported (golint)
    • Line 912: warning: exported var ErrParseElm should have comment or be unexported (golint)
    • Line 913: warning: exported var ErrParseToken should have comment or be unexported (golint)
    • twtxt/internal/errors.go
    • Line 8: warning: exported type ErrCommandKilled should have comment or be unexported (golint)
    • Line 13: warning: exported method ErrCommandKilled.Is should have comment or be unexported (golint)
    • Line 28: warning: exported type ErrCommandFailed should have comment or be unexported (golint)
    • Line 33: warning: exported method ErrCommandFailed.Is should have comment or be unexported (golint)
    • Line 48: warning: exported type ErrTranscodeTimeout should have comment or be unexported (golint)
    • Line 60: warning: exported type ErrTranscodeFailed should have comment or be unexported (golint)
    • Line 72: warning: exported type ErrAudioUploadFailed should have comment or be unexported (golint)
    • Line 84: warning: exported type ErrVideoUploadFailed should have comment or be unexported (golint)
    • twtxt/internal/messages.go
    • Line 26: warning: exported type Message should have comment or be unexported (golint)
    • Line 36: warning: exported method Message.User should have comment or be unexported (golint)
    • Line 41: warning: exported method Message.Text should have comment or be unexported (golint)
    • Line 45: warning: exported type Messages should have comment or be unexported (golint)
    • twtxt/internal/templates.go
    • Line 30: warning: exported type TemplateManager should have comment or be unexported (golint)
    • Line 38: warning: exported function NewTemplateManager should have comment or be unexported (golint)
    • Line 78: warning: exported method TemplateManager.LoadTemplates should have comment or be unexported (golint)
    • Line 130: warning: exported method TemplateManager.Add should have comment or be unexported (golint)
    • Line 137: warning: exported method TemplateManager.Exec should have comment or be unexported (golint)
    • twtxt/internal/ttlcache.go
    • Line 19: warning: exported type TTLCache should have comment or be unexported (golint)
    • Line 26: warning: exported method TTLCache.Dec should have comment or be unexported (golint)
    • Line 30: warning: exported method TTLCache.Inc should have comment or be unexported (golint)
    • Line 44: warning: exported method TTLCache.Get should have comment or be unexported (golint)
    • Line 52: warning: exported method TTLCache.GetString should have comment or be unexported (golint)
    • Line 69: warning: exported method TTLCache.Set should have comment or be unexported (golint)
    • Line 74: warning: exported method TTLCache.SetString should have comment or be unexported (golint)
    • Line 79: warning: exported method TTLCache.Reset should have comment or be unexported (golint)
    • Line 83: warning: exported function NewTTLCache should have comment or be unexported (golint)
    • twtxt/types/lextwt/ast.go
    • Line 23: warning: exported type Elem should have comment or be unexported (golint)
    • Line 31: warning: exported type Line should have comment or be unexported (golint)
    • Line 36: warning: exported type Comment should have comment or be unexported (golint)
    • Line 44: warning: exported function NewComment should have comment or be unexported (golint)
    • Line 47: warning: exported function NewCommentValue should have comment or be unexported (golint)
    • Line 50: warning: exported method Comment.IsNil should have comment or be unexported (golint)
    • Line 51: warning: exported method Comment.Literal should have comment or be unexported (golint)
    • Line 53: warning: exported method Comment.Key should have comment or be unexported (golint)
    • Line 54: warning: exported method Comment.Value should have comment or be unexported (golint)
    • Line 56: warning: exported type Comments should have comment or be unexported (golint)
    • Line 68: warning: exported method Comments.GetN should have comment or be unexported (golint)
    • Line 92: warning: exported method Comments.GetAll should have comment or be unexported (golint)
    • Line 108: warning: exported method Comments.Followers should have comment or be unexported (golint)
    • Line 123: warning: exported type DateTime should have comment or be unexported (golint)
    • Line 131: warning: exported function NewDateTime should have comment or be unexported (golint)
    • Line 137: warning: exported method DateTime.CloneDateTime should have comment or be unexported (golint)
    • Line 145: warning: exported method DateTime.IsNil should have comment or be unexported (golint)
    • Line 146: warning: exported method DateTime.Literal should have comment or be unexported (golint)
    • Line 153: warning: exported method DateTime.DateTime should have comment or be unexported (golint)
    • Line 160: warning: exported type Mention should have comment or be unexported (golint)
    • Line 174: warning: exported function NewMention should have comment or be unexported (golint)
    • Line 194: warning: exported method Mention.Clone should have comment or be unexported (golint)
    • Line 202: warning: exported method Mention.IsNil should have comment or be unexported (golint)
    • Line 203: warning: exported method Mention.Twter should have comment or be unexported (golint)
    • Line 204: warning: exported method Mention.Literal should have comment or be unexported (golint)
    • Line 206: warning: exported method Mention.Name should have comment or be unexported (golint)
    • Line 207: warning: exported method Mention.Domain should have comment or be unexported (golint)
    • Line 213: warning: exported method Mention.Target should have comment or be unexported (golint)
    • Line 214: warning: exported method Mention.SetTarget should have comment or be unexported (golint)
    • Line 215: warning: exported method Mention.URL should have comment or be unexported (golint)
    • Line 221: warning: exported method Mention.Err should have comment or be unexported (golint)
    • Line 225: warning: exported method Mention.Format should have comment or be unexported (golint)
    • Line 239: warning: exported method Mention.FormatCompact should have comment or be unexported (golint)
    • Line 252: warning: exported method Mention.FormatText should have comment or be unexported (golint)
    • Line 268: warning: exported method Mention.FormatMarkdown should have comment or be unexported (golint)
    • Line 284: warning: exported method Mention.FormatHTML should have comment or be unexported (golint)
    • Line 304: warning: exported type Tag should have comment or be unexported (golint)
    • Line 317: warning: exported function NewTag should have comment or be unexported (golint)
    • Line 326: warning: exported method Tag.Clone should have comment or be unexported (golint)
    • Line 329: warning: exported method Tag.CloneTag should have comment or be unexported (golint)
    • Line 337: warning: exported method Tag.IsNil should have comment or be unexported (golint)
    • Line 338: warning: exported method Tag.Literal should have comment or be unexported (golint)
    • Line 340: warning: exported method Tag.Text should have comment or be unexported (golint)
    • Line 341: warning: exported method Tag.Target should have comment or be unexported (golint)
    • Line 342: warning: exported method Tag.URL should have comment or be unexported (golint)
    • Line 348: warning: exported method Tag.Format should have comment or be unexported (golint)
    • Line 362: warning: exported method Tag.FormatCompact should have comment or be unexported (golint)
    • Line 365: warning: exported method Tag.FormatText should have comment or be unexported (golint)
    • Line 378: warning: exported method Tag.FormatMarkdown should have comment or be unexported (golint)
    • Line 392: warning: exported method Tag.FormatHTML should have comment or be unexported (golint)
    • Line 401: warning: exported type Subject should have comment or be unexported (golint)
    • Line 409: warning: exported function NewSubject should have comment or be unexported (golint)
    • Line 410: warning: exported function NewSubjectTag should have comment or be unexported (golint)
    • Line 411: warning: exported method Subject.Clone should have comment or be unexported (golint)
    • Line 420: warning: exported method Subject.IsNil should have comment or be unexported (golint)
    • Line 421: warning: exported method Subject.Literal should have comment or be unexported (golint)
    • Line 428: warning: exported method Subject.Text should have comment or be unexported (golint)
    • Line 434: warning: exported method Subject.Tag should have comment or be unexported (golint)
    • Line 435: warning: exported method Subject.Format should have comment or be unexported (golint)
    • Line 448: warning: exported type Text should have comment or be unexported (golint)
    • Line 454: warning: exported function NewText should have comment or be unexported (golint)
    • Line 455: warning: exported method Text.Clone should have comment or be unexported (golint)
    • Line 461: warning: exported method Text.IsNil should have comment or be unexported (golint)
    • Line 462: warning: exported method Text.Literal should have comment or be unexported (golint)
    • Line 464: warning: exported method Text.Format should have comment or be unexported (golint)
    • Line 467: warning: exported method Text.IsSpace should have comment or be unexported (golint)
    • Line 476: warning: exported var LineSeparator should have comment or be unexported (golint)
    • Line 490: warning: exported type Link should have comment or be unexported (golint)
    • Line 498: warning: exported type LinkType should have comment or be unexported (golint)
    • Line 501: warning: exported const LinkStandard should have comment (or a comment on this block) or be unexported (golint)
    • Line 507: warning: exported function NewLink should have comment or be unexported (golint)
    • Line 508: warning: exported method Link.Clone should have comment or be unexported (golint)
    • Line 516: warning: exported method Link.IsNil should have comment or be unexported (golint)
    • Line 517: warning: exported method Link.Literal should have comment or be unexported (golint)
    • Line 529: warning: exported method Link.Format should have comment or be unexported (golint)
    • Line 535: warning: exported method Link.IsMedia should have comment or be unexported (golint)
    • Line 536: warning: exported method Link.Text should have comment or be unexported (golint)
    • Line 537: warning: exported method Link.Target should have comment or be unexported (golint)
    • Line 539: warning: exported type Code should have comment or be unexported (golint)
    • Line 544: warning: exported type CodeType should have comment or be unexported (golint)
    • Line 547: warning: exported const CodeInline should have comment (or a comment on this block) or be unexported (golint)
    • Line 553: warning: exported function NewCode should have comment or be unexported (golint)
    • Line 554: warning: exported method Code.Clone should have comment or be unexported (golint)
    • Line 562: warning: exported method Code.IsNil should have comment or be unexported (golint)
    • Line 563: warning: exported method Code.Literal should have comment or be unexported (golint)
    • Line 569: warning: exported method Code.Format should have comment or be unexported (golint)
    • Line 577: warning: exported method Code.FormatMarkdown should have comment or be unexported (golint)
    • Line 584: warning: exported type Twt should have comment or be unexported (golint)
    • Line 601: warning: exported function NewTwt should have comment or be unexported (golint)
    • Line 614: warning: exported function ParseText should have comment or be unexported (golint)
    • Line 685: warning: exported method Twt.IsNil should have comment or be unexported (golint)
    • Line 686: warning: exported method Twt.FilePos should have comment or be unexported (golint)
    • Line 687: warning: exported method Twt.IsZero should have comment or be unexported (golint)
    • Line 688: warning: exported method Twt.Elems should have comment or be unexported (golint)
    • Line 689: warning: exported method Twt.Literal should have comment or be unexported (golint)
    • Line 697: warning: exported method Twt.LiteralText should have comment or be unexported (golint)
    • Line 707: warning: exported method Twt.Clone should have comment or be unexported (golint)
    • Line 710: warning: exported method Twt.CloneTwt should have comment or be unexported (golint)
    • Line 717: warning: exported method Twt.Text should have comment or be unexported (golint)
    • Line 724: warning: exported method Twt.GobEncode should have comment or be unexported (golint)
    • Line 736: warning: exported method Twt.GobDecode should have comment or be unexported (golint)
    • Line 760: warning: exported method Twt.MarshalJSON should have comment or be unexported (golint)
    • Line 788: warning: exported function DecodeJSON should have comment or be unexported (golint)
    • Line 815: warning: exported method Twt.Format should have comment or be unexported (golint)
    • Line 830: warning: exported method Twt.FormatTwt should have comment or be unexported (golint)
    • Line 833: warning: exported method Twt.FormatText should have comment or be unexported (golint)
    • Line 881: warning: exported method Twt.ExpandLinks should have comment or be unexported (golint)
    • Line 904: warning: exported method Twt.Created should have comment or be unexported (golint)
    • Line 905: warning: exported method Twt.Mentions should have comment or be unexported (golint)
    • Line 912: warning: exported method Twt.Tags should have comment or be unexported (golint)
    • Line 919: warning: exported method Twt.Links should have comment or be unexported (golint)
    • Line 926: warning: exported method Twt.Twter should have comment or be unexported (golint)
    • Line 932: warning: exported method Twt.Hash should have comment or be unexported (golint)
    • Line 952: warning: exported method Twt.Subject should have comment or be unexported (golint)
    • twtxt/cmd/twt/ui.go
    • Line 27: warning: exported function PrintFollowee should have comment or be unexported (golint)
    • Line 34: warning: exported function PrintFolloweeRaw should have comment or be unexported (golint)
    • Line 38: warning: exported function PrintTwt should have comment or be unexported (golint)
    • Line 55: warning: exported function PrintTwtRaw should have comment or be unexported (golint)
    • twtxt/internal/bitcask_store.go
    • Line 70: warning: exported method BitcaskStore.HasFeed should have comment or be unexported (golint)
    • Line 75: warning: exported method BitcaskStore.DelFeed should have comment or be unexported (golint)
    • Line 80: warning: exported method BitcaskStore.GetFeed should have comment or be unexported (golint)
    • Line 89: warning: exported method BitcaskStore.SetFeed should have comment or be unexported (golint)
    • Line 102: warning: exported method BitcaskStore.LenFeeds should have comment or be unexported (golint)
    • Line 115: warning: exported method BitcaskStore.SearchFeeds should have comment or be unexported (golint)
    • Line 130: warning: exported method BitcaskStore.GetAllFeeds should have comment or be unexported (golint)
    • Line 153: warning: exported method BitcaskStore.HasUser should have comment or be unexported (golint)
    • Line 158: warning: exported method BitcaskStore.DelUser should have comment or be unexported (golint)
    • Line 163: warning: exported method BitcaskStore.GetUser should have comment or be unexported (golint)
    • Line 172: warning: exported method BitcaskStore.SetUser should have comment or be unexported (golint)
    • Line 185: warning: exported method BitcaskStore.LenUsers should have comment or be unexported (golint)
    • Line 198: warning: exported method BitcaskStore.SearchUsers should have comment or be unexported (golint)
    • Line 213: warning: exported method BitcaskStore.GetAllUsers should have comment or be unexported (golint)
    • Line 236: warning: exported method BitcaskStore.GetSession should have comment or be unexported (golint)
    • Line 252: warning: exported method BitcaskStore.SetSession should have comment or be unexported (golint)
    • Line 263: warning: exported method BitcaskStore.HasSession should have comment or be unexported (golint)
    • Line 268: warning: exported method BitcaskStore.DelSession should have comment or be unexported (golint)
    • Line 273: warning: exported method BitcaskStore.SyncSession should have comment or be unexported (golint)
    • Line 283: warning: exported method BitcaskStore.LenSessions should have comment or be unexported (golint)
    • Line 296: warning: exported method BitcaskStore.GetAllSessions should have comment or be unexported (golint)
    • Line 319: warning: exported method BitcaskStore.GetUserTokens should have comment or be unexported (golint)
    • Line 333: warning: exported method BitcaskStore.GetToken should have comment or be unexported (golint)
    • Line 347: warning: exported method BitcaskStore.SetToken should have comment or be unexported (golint)
    • Line 360: warning: exported method BitcaskStore.DelToken should have comment or be unexported (golint)
    • Line 365: warning: exported method BitcaskStore.LenTokens should have comment or be unexported (golint)
    • twtxt/internal/context.go
    • Line 20: warning: exported type Meta should have comment or be unexported (golint)
    • Line 30: warning: exported type Context should have comment or be unexported (golint)
    • Line 94: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 193: warning: exported method Context.Translate should have comment or be unexported (golint)
    • twtxt/internal/handlers.go
    • Line 40: warning: exported const MediaResolution should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported var ErrFeedImposter should have comment or be unexported (golint)
    • Line 53: warning: exported method Server.NotFoundHandler should have comment or be unexported (golint)
    • Line 66: warning: exported type FrontMatter should have comment or be unexported (golint)
    • Line 296: warning: comment on exported method Server.ManageFeedHandler should be of the form "ManageFeedHandler ..." (golint)
    • Line 389: warning: comment on exported method Server.ArchiveFeedHandler should be of the form "ArchiveFeedHandler ..." (golint)
    • Line 2041: warning: comment on exported method Server.TransferFeedHandler should be of the form "TransferFeedHandler ..." (golint)
    • twtxt/types/lextwt/lextwt.go
    • Line 13: warning: exported function DefaultTwtManager should have comment or be unexported (golint)
    • Line 83: warning: exported function ParseLine should have comment or be unexported (golint)
    • Line 135: warning: exported function NewTwtFile should have comment or be unexported (golint)
    • twtxt/internal/task.go
    • Line 5: warning: exported type TaskState should have comment or be unexported (golint)
    • Line 8: warning: exported const TaskStatePending should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type TaskData should have comment or be unexported (golint)
    • Line 31: warning: exported type TaskResult should have comment or be unexported (golint)
    • twtxt/internal/services.go
    • Line 67: warning: exported function NewMboxHandler should have comment or be unexported (golint)
    • Line 143: warning: exported type POP3Service should have comment or be unexported (golint)
    • Line 165: warning: exported method POP3Service.Start should have comment or be unexported (golint)
    • Line 173: warning: exported method POP3Service.Stop should have comment or be unexported (golint)
    • Line 175: warning: exported method POP3Service.ListenAndServe should have comment or be unexported (golint)
    • Line 192: warning: exported type SMTPService should have comment or be unexported (golint)
    • Line 309: warning: exported method SMTPService.Start should have comment or be unexported (golint)
    • Line 317: warning: exported method SMTPService.Stop should have comment or be unexported (golint)
    • Line 319: warning: exported method SMTPService.ListenAndServe should have comment or be unexported (golint)
    • twtxt/internal/archive.go
    • Line 23: warning: exported var ErrTwtAlreadyArchived should have comment or be unexported (golint)
    • Line 42: warning: exported function NewNullArchiver should have comment or be unexported (golint)
    • Line 46: warning: exported method NullArchiver.Del should have comment or be unexported (golint)
    • Line 47: warning: exported method NullArchiver.Has should have comment or be unexported (golint)
    • Line 48: warning: exported method NullArchiver.Get should have comment or be unexported (golint)
    • Line 49: warning: exported method NullArchiver.Archive should have comment or be unexported (golint)
    • Line 50: warning: exported method NullArchiver.Count should have comment or be unexported (golint)
    • Line 59: warning: exported function NewDiskArchiver should have comment or be unexported (golint)
    • Line 94: warning: exported method DiskArchiver.Del should have comment or be unexported (golint)
    • Line 108: warning: exported method DiskArchiver.Has should have comment or be unexported (golint)
    • Line 118: warning: exported method DiskArchiver.Get should have comment or be unexported (golint)
    • Line 145: warning: exported method DiskArchiver.Archive should have comment or be unexported (golint)
    • Line 176: warning: exported method DiskArchiver.Count should have comment or be unexported (golint)
    • twtxt/internal/base_task.go
    • Line 9: warning: exported type BaseTask should have comment or be unexported (golint)
    • Line 16: warning: exported function NewBaseTask should have comment or be unexported (golint)
    • Line 23: warning: exported method BaseTask.SetState should have comment or be unexported (golint)
    • Line 27: warning: exported method BaseTask.SetData should have comment or be unexported (golint)
    • Line 34: warning: exported method BaseTask.Done should have comment or be unexported (golint)
    • Line 42: warning: exported method BaseTask.Fail should have comment or be unexported (golint)
    • Line 47: warning: exported method BaseTask.Result should have comment or be unexported (golint)
    • Line 62: warning: exported method BaseTask.ID should have comment or be unexported (golint)
    • Line 63: warning: exported method BaseTask.State should have comment or be unexported (golint)
    • twtxt/internal/feedsources.go
    • Line 17: warning: exported type FeedSource should have comment or be unexported (golint)
    • Line 22: warning: exported type FeedSourceMap should have comment or be unexported (golint)
    • Line 24: warning: exported type FeedSources should have comment or be unexported (golint)
    • Line 28: warning: exported function SaveFeedSources should have comment or be unexported (golint)
    • Line 52: warning: exported function LoadFeedSources should have comment or be unexported (golint)
    • Line 76: warning: exported function FetchFeedSources should have comment or be unexported (golint)
    • Line 122: warning: exported function ParseFeedSource should have comment or be unexported (golint)
    • twtxt/internal/video_task.go
    • Line 10: warning: exported type VideoTask should have comment or be unexported (golint)
    • Line 17: warning: exported function NewVideoTask should have comment or be unexported (golint)
    • Line 27: warning: exported method VideoTask.Run should have comment or be unexported (golint)
    • twtxt/types/profile.go
    • Line 34: warning: exported type Link should have comment or be unexported (golint)
    • Line 39: warning: exported type Alternative should have comment or be unexported (golint)
    • Line 45: warning: exported type Alternatives should have comment or be unexported (golint)
    • Line 46: warning: exported type Links should have comment or be unexported (golint)

gocyclo82%

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.

    • twtxt/internal/api.go
    • Line 883: warning: cyclomatic complexity 19 of function (*API).UploadMediaEndpoint() is high (> 15) (gocyclo)
    • Line 568: warning: cyclomatic complexity 16 of function (*API).FollowEndpoint() is high (> 15) (gocyclo)
    • twtxt/internal/server.go
    • Line 320: warning: cyclomatic complexity 19 of function (*Server).processWebMention() is high (> 15) (gocyclo)
    • Line 651: warning: cyclomatic complexity 17 of function NewServer() is high (> 15) (gocyclo)
    • twtxt/types/lextwt/ast.go
    • Line 833: warning: cyclomatic complexity 19 of function (Twt).FormatText() is high (> 15) (gocyclo)
    • Line 633: warning: cyclomatic complexity 18 of function (*Twt).append() is high (> 15) (gocyclo)
    • twtxt/types/lextwt/parser.go
    • Line 145: warning: cyclomatic complexity 30 of function (*parser).ParseDateTime() is high (> 15) (gocyclo)
    • Line 608: warning: cyclomatic complexity 24 of function (*parser).ParseLink() is high (> 15) (gocyclo)
    • Line 334: warning: cyclomatic complexity 20 of function (*parser).ParseMention() is high (> 15) (gocyclo)
    • twtxt/internal/media_handlers.go
    • Line 101: warning: cyclomatic complexity 18 of function (*Server).UploadMediaHandler() is high (> 15) (gocyclo)
    • Line 18: warning: cyclomatic complexity 16 of function (*Server).MediaHandler() is high (> 15) (gocyclo)
    • twtxt/internal/handlers.go
    • Line 2117: warning: cyclomatic complexity 29 of function (*Server).DeleteAllHandler() is high (> 15) (gocyclo)
    • Line 577: warning: cyclomatic complexity 25 of function (*Server).PostHandler() is high (> 15) (gocyclo)
    • Line 458: warning: cyclomatic complexity 22 of function (*Server).AvatarHandler() is high (> 15) (gocyclo)
    • twtxt/internal/utils.go
    • Line 906: warning: cyclomatic complexity 20 of function TranscodeVideo() is high (> 15) (gocyclo)
    • Line 829: warning: cyclomatic complexity 16 of function ProcessImage() is high (> 15) (gocyclo)
    • twtxt/internal/messages.go
    • Line 74: warning: cyclomatic complexity 18 of function deleteMessages() is high (> 15) (gocyclo)
    • Line 172: warning: cyclomatic complexity 17 of function markMessageAsRead() is high (> 15) (gocyclo)

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!


misspell94%

Misspell Finds commonly misspelled English words

    • twtxt/internal/manage_handlers.go
    • Line 227: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 243: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 253: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 267: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 278: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 291: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 302: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 316: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 326: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 341: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 352: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 362: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 373: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 381: warning: "occured" is a misspelling of "occurred" (misspell)