Documentation ¶
Index ¶
- func ActualDate(utcDate time.Time, lat, long float64) time.Time
- func Base64Decode(str string) (string, error)
- func Base64Encode(str string) string
- func CityFromCoords(lat, lon float64) (string, error)
- func DurationToMiles(dur time.Duration) float32
- func FileExists(path string) bool
- func GoogleMapsURL(lat, long float64) string
- func InvertMap(m map[string]string) map[string]string
- func OpenInBrowser(url string)
- func ParseLatLng(ocrStr string) (float64, float64, error)
- func PidExists(pid int) (bool, error)
- func PrintAllRoutes(r *mux.Router)
- func ProjectRoot() string
- func ReadPidFile(pidFile string) int
- func RemoveNonLetters(input string) string
- func RunningOnDarwin() bool
- func RunningOnLinux() bool
- func RunningOnWindows() bool
- func SendSMS(message string)
- func SplitOnRegex(text string, delimeter string) []string
- func StateAbbrevToState(abbrev string) string
- func StateFromCoords(lat, lon float64) (string, error)
- func StateToStateAbbrev(state string) string
- func StripAtSign(username string) string
- func SunsetStr(utcDate time.Time, lat, lon float64) string
- func TitlecaseState(state string) string
- func WritePidFile(pidFile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func CityFromCoords ¶
func DurationToMiles ¶
DurationToMiles converts Durations to miles
func GoogleMapsURL ¶
GoogleMapsURL returns a google maps link to the coords provided TODO find query param for zoom level
func OpenInBrowser ¶
func OpenInBrowser(url string)
TODO: text the admin if it errors opening browser?
func ParseLatLng ¶
ParseLatLng converts an OCRed string into a LatLng
func PrintAllRoutes ¶
func ReadPidFile ¶
func RemoveNonLetters ¶
func RunningOnDarwin ¶
func RunningOnDarwin() bool
TODO: remove this and all darwin-only support RunningOnDarwin returns true if we're on darwin (OS X)
func RunningOnWindows ¶
func RunningOnWindows() bool
RunningOnWindows returns true if we're on windows
func SplitOnRegex ¶
SplitOnRegex will is the equivalent of str.split(/regex/)
func StateAbbrevToState ¶
func StateFromCoords ¶
func StateToStateAbbrev ¶
func StripAtSign ¶
func TitlecaseState ¶
TODO: this doesnt handle the case where the state is invalid
func WritePidFile ¶
this nastiness taken from: https://gist.github.com/davidnewhall/3627895a9fc8fa0affbd747183abca39 Write a pid file, but first make sure it doesn't exist with a running pid. TODO: consider refactoring to use PidExists()
Types ¶
This section is empty.