helpers

package
v0.0.0-...-b2bdbfd Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendOrCreateFile

func AppendOrCreateFile(filename string) (*os.File, error)

AppendOrCreateFile - Opens an existing file to be appended or creates a new one if it does not already exist

func CreateDirectoryForFile

func CreateDirectoryForFile(filename string) error

CreateDirectoryForFile - Creates the directory for the given file

func DeleteFile

func DeleteFile(filename string) error

DeleteFile - Deletes the file

func FileExists

func FileExists(filename string) (bool, error)

FileExists - Returns if the file exists

func HigherLogLevel

func HigherLogLevel(config string, cli string) (log.Level, error)

HigherLogLevel - returns the higher logrus.Level of the two log levels submitted

func ReadFile

func ReadFile(filename string) ([]byte, error)

ReadFile - Returns the file as a byte array

func SplitFileName

func SplitFileName(filename string) (string, string, string)

SplitFileName - Returns the directory, filename and extension in 3 seperate strings

Types

This section is empty.

Jump to

Keyboard shortcuts

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