Documentation
¶
Index ¶
- Constants
- func Atoi(a string) int
- func Atoi2(s string, msg string, a ...any) int
- func CheckError(err error)
- func CheckError2(err error, msg string, a ...any)
- func CopyFile(src, dst string)
- func CreateDir(dir string)
- func CreateDirForFile(path string)
- func CreateFile(path string) *os.File
- func Debug(msg string, a ...any)
- func DirExists(dir string) bool
- func DirMustExist(dir string)
- func Error(msg string, a ...any)
- func Fatal(msg string, a ...any)
- func FileExists(path string) bool
- func GetNumberOrQuit(prompt string) int
- func GetResponse(prompt string) string
- func Info(msg string, a ...any)
- func IsDir(dir string) bool
- func Log(level int, msg string, a ...any)
- func OpenFile(path string) *os.File
- func ParseFloat64(s string, msg string, a ...any) float64
- func ParseInt64(s string, msg string, a ...any) int64
- func ReadFileB(path string) []byte
- func ReadFileL(path string) []string
- func ReadFileS(path string) string
- func SetLogLevel(level int)
- func SetLogLevelByName(name string)
- func Trace(msg string, a ...any)
- func Warn(msg string, a ...any)
Constants ¶
View Source
const DEBUG = 5
View Source
const ERROR = 2
View Source
const FATAL = 1
View Source
const INFO = 4
View Source
const TRACE = 6
View Source
const WARN = 3
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
func CheckError(err error)
func CheckError2 ¶ added in v1.5.0
func CopyFile ¶
func CopyFile(src, dst string)
Got this from https://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file Copy the src file to dst. Any existing file will be overwritten and the file attributes will not be copied. Note that like all the other functions in this module, an error is fatal to the calling program.
func CreateDirForFile ¶ added in v1.1.0
func CreateDirForFile(path string)
func CreateFile ¶
func DirMustExist ¶
func DirMustExist(dir string)
func FileExists ¶
func GetNumberOrQuit ¶ added in v1.5.0
func GetResponse ¶ added in v1.5.0
func SetLogLevel ¶
func SetLogLevel(level int)
func SetLogLevelByName ¶ added in v1.3.0
func SetLogLevelByName(name string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.