Documentation
¶
Index ¶
- func CreateTempFile(tempDir string, nameTemplate string) (string, error)
- func CreateTempFileWithContent(tempDir string, content string, nameTemplate string) (string, error)
- func GetFormattedTime(t string) time.Time
- func IsEmpty(data interface{}) bool
- func IsNotEmpty(data interface{}) bool
- func MatchSlice(regex *regexp.Regexp, hayStack []string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTempFile ¶ added in v1.2.0
CreateTempFile will create a temporary file using the nameTemplate. If `tempDir` is the empty string, `os.TempDir()` will be used as the target directory. Returns the name of the created file, and error is not nil if some problem happened
func CreateTempFileWithContent ¶
CreateTempFileWithContent will create a temporary file with the content passed, and using the nameTemplate. If `tempDir` is the empty string, `os.TempDir()` will be used as the target directory. Returns the name of the created file, and error is not nil if some problem happened
func GetFormattedTime ¶
GetFormattedTime returns a time.Time object from the string
func IsEmpty ¶
func IsEmpty(data interface{}) bool
IsEmpty helper that returns true when a type is empty
func IsNotEmpty ¶
func IsNotEmpty(data interface{}) bool
IsNotEmpty helper that returns true when a type is not empty
Types ¶
This section is empty.