Documentation
¶
Index ¶
- func ArrContains(arr []string, value string) bool
- func FileExists(path string) bool
- func GetContentType(filename string) string
- func Marshall(data interface{}, fileName string) (resultErr error)
- func MkFile(path string, fileContents string) string
- func MkTempDir(dirSuffix string) string
- func MkTempFile(fileName string, fileContents string) string
- func ParsePath(path string) (result string)
- func ReadFile(path string) ([]byte, error)
- func Unmarshall(fileName string, out interface{}) (resultErr error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrContains ¶
ArrContains returns true if string is contained in string array
func GetContentType ¶
GetContentType returns mime type (content-type) for given filename
func MkTempFile ¶
MkTempFile Creates a temporary file with provided string content, returns path
func ParsePath ¶
ParsePath takes human readable path (relative or absolute, with ~) and returns it to absolute path Main motivation is to turn ~ to home directory
func ReadFile ¶
ReadFile returns contents of the file. It uses ParsePath at the top of standard ioutil.ReadFile
func Unmarshall ¶
Unmarshall turns yaml file into data
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.