Documentation ¶
Index ¶
- func CheckAndCreateDirectory(path string, mode os.FileMode) error
- func Copy(src io.ReadCloser, w io.Writer) error
- func OnCreateNewFile(localFile string, fnOnCreate OnWriterFunc) error
- func OnReadClose(reader io.ReadCloser, fnOnReadClose OnReadCloseFunc) error
- func OnReadEntireFile(localFile string, fnOnBytes OnBytesFunc) error
- func OnTempDirectory(dir string, prefix string, fnOnDir OnDirFunc) (string, error)
- func ToSet(myList []string) []string
- func WriteString(writer io.Writer, s string) error
- func WriteStringln(writer io.Writer, s string) error
- func WriteStrings(writer io.Writer, s []string) error
- func WriteTarFile(inputDirectory string, w io.Writer) error
- type OnBytesFunc
- type OnDirFunc
- type OnGenericFunc
- type OnProfileFunc
- type OnReadCloseFunc
- type OnWriterFunc
- type Profile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAndCreateDirectory ¶
CheckAndCreateDirectory checks if the directory exists in path . Creates if it does not exist
func Copy ¶ added in v0.2.4
func Copy(src io.ReadCloser, w io.Writer) error
Copy copies the data from readCloser to the writer
func OnCreateNewFile ¶
func OnCreateNewFile(localFile string, fnOnCreate OnWriterFunc) error
OnCreateNewFile creates a new file and performs an operation on the same
func OnReadClose ¶ added in v0.2.3
func OnReadClose(reader io.ReadCloser, fnOnReadClose OnReadCloseFunc) error
OnReadClose closes a given reader in that function
func OnReadEntireFile ¶
func OnReadEntireFile(localFile string, fnOnBytes OnBytesFunc) error
OnReadEntireFile reads the entire file and processes the same
func OnTempDirectory ¶
OnTempDirectory creates a temp directory and provides the same for using it
func WriteString ¶ added in v0.2.1
WriteString writes a given string
func WriteStringln ¶ added in v0.2.1
WriteStringln writes a given string with new line
func WriteStrings ¶ added in v0.2.1
WriteStrings writes an array of strings separated by newline
Types ¶
type OnBytesFunc ¶ added in v0.2.2
OnBytesFunc represents a function to act on the bytes
type OnGenericFunc ¶ added in v0.2.8
type OnGenericFunc func() error
OnGenericFunc represents a function that returns an error or otherwise
type OnProfileFunc ¶ added in v0.2.8
OnProfileFunc is a function executed on the receipt of a given profile
type OnReadCloseFunc ¶ added in v0.2.3
type OnReadCloseFunc func(reader io.ReadCloser) error
OnReadCloseFunc represents a func to act on a given io.ReadCloser instance and closes the same
type OnWriterFunc ¶ added in v0.2.2
OnWriterFunc represents a function to act on a writer
type Profile ¶ added in v0.2.8
Profile represents the start and end time of a profile
func NewProfile ¶ added in v0.2.8
NewProfile creates a new profile
func RunProfile ¶ added in v0.2.8
func RunProfile(name string, fnOnGenericFunc OnGenericFunc) (*Profile, error)
RunProfile returns a profile along with the status of the function