Documentation ¶
Index ¶
- func FindCanonicalURL(url string, secondTry bool) (out string)
- func GetUserAgent() string
- func HashTagText(words []string) (s string)
- func LoadJSON(filename string, target interface{}) (err error)
- func LogError(err error, location string) bool
- func SaveJSON(filename string, source interface{}) (err error)
- type ArticleStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindCanonicalURL ¶
FindCanonicalURL returns the canonical URL of an article if possible, else the original input is returned
func GetUserAgent ¶
func GetUserAgent() string
func HashTagText ¶
Types ¶
type ArticleStore ¶
type ArticleStore struct { // SeenArticles maps an article URL to the last time it was seen SeenArticles map[string]time.Time // contains filtered or unexported fields }
func NewArticleStore ¶
func NewArticleStore(filename string, keepDuration time.Duration) (*ArticleStore, error)
func (*ArticleStore) HasSeen ¶
func (a *ArticleStore) HasSeen(url string) (seen bool, canonical string, err error)
func (*ArticleStore) MarkSeen ¶
func (a *ArticleStore) MarkSeen(url, canonicalArticleURL string) error
func (*ArticleStore) ShouldIgnoreTweet ¶
func (a *ArticleStore) ShouldIgnoreTweet(tweet *twitter.Tweet) (ignore bool)
Click to show internal directories.
Click to hide internal directories.