utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeFormatMap = map[string]string{
	"Layout":      time.Layout,
	"ANSIC":       time.ANSIC,
	"UnixDate":    time.UnixDate,
	"RubyDate":    time.RubyDate,
	"RFC822":      time.RFC822,
	"RFC822Z":     time.RFC822Z,
	"RFC850":      time.RFC850,
	"RFC1123":     time.RFC1123,
	"RFC1123Z":    time.RFC1123Z,
	"RFC3339":     time.RFC3339,
	"RFC3339Nano": time.RFC3339Nano,
	"Kitchen":     time.Kitchen,
	"Stamp":       time.Stamp,
	"StampMilli":  time.StampMilli,
	"StampMicro":  time.StampMicro,
	"StampNano":   time.StampNano,
}

TimeFormatMap map of time formats

Functions

func CreateFilePath

func CreateFilePath(filePath string) error

CreateFilePath will create the desired filePath if it does not exist

func DownloadPayload

func DownloadPayload(uri string) ([]byte, error)

DownloadPayload calls a URL and returns the bytes of the response body.

func GetTimeFormat added in v0.1.1

func GetTimeFormat(format string, fallback string) string

GetTimeFormat attempts to find a standard time format, else will return the fallback on empty strings or unaltered.

func ReadSTDIN

func ReadSTDIN() ([]byte, error)

ReadSTDIN provides input reader from STDIN

Types

This section is empty.

Jump to

Keyboard shortcuts

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