fileutil

package
v0.0.0-...-00e7cc2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2018 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadToMemory

func DownloadToMemory(url string) ([]byte, error)

DownloadToMemory downloads a file from a url to memory

func EnsureDir

func EnsureDir(path string, mode os.FileMode) (os.FileInfo, error)

EnsureDir at the specified path with the specified mode.

func FileExists

func FileExists(path string) bool

FileExists exists and is accessible and the specified path.

func ReadLines

func ReadLines(filepath string) ([]string, error)

ReadLines from a file and return them including any errors.

func ReadYamlFromFile

func ReadYamlFromFile(filename string, target interface{}) error

ReadYamlFromFile at path filename into the target interface.

func TempFile

func TempFile(contents string) (string, error)

TempFile with the passed contents.

func WriteYamlToFile

func WriteYamlToFile(filename string, target interface{}) error

WriteYamlToFile at path filename sourcing the data from the passed target.

func WriteYamlToWriter

func WriteYamlToWriter(writer io.Writer, target interface{}) error

WriteYamlToWriter returning any errors that occur.

Types

This section is empty.

Jump to

Keyboard shortcuts

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