util

package
v0.0.0-...-8c4bcf2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NorthAmericaTZ = time.FixedZone("CDT", -5*60*60)

This is the time zone for Texas For other operations SpaceX also uses EDT, but doesn't seem to be the case with Starship stuff

Functions

func ExtractDate

func ExtractDate(text string, now time.Time) (date time.Time, ok bool)

ExtractDate extracts human-readable dates from text

func FindCanonicalURL

func FindCanonicalURL(url string, secondTry bool) (out string)

FindCanonicalURL returns the canonical URL of an article if possible, else the original input is returned

func GetUserAgent

func GetUserAgent() string

func HashTagText

func HashTagText(words []string) string

func LoadJSON

func LoadJSON(filename string, target interface{}) (err error)

func LogError

func LogError(err error, format string, a ...interface{}) bool

func SaveJSON

func SaveJSON(filename string, source interface{}) (err error)

func TweetURL

func TweetURL(tweet *twitter.Tweet) string

TweetURL returns the URL for this tweet

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL