package
1.9.0
Repository: https://github.com/ibrt/golang-bites.git
Documentation: pkg.go.dev

# Functions

MustAbs is like filepath.Abs, but panics on error.
MustCheckExists checks if the given path exists, panics on error (other than os.ErrNotExist).
MustCopyEmbedFSSimple copies regular files and directories from embed.FS to disk.
MustCreateTempDir is like os.MkdirTemp, but panics on error.
MustGetWD is like os.Getwd, but panics on error.
MustPrepareDir deletes the given directory and its contents (if present) and recreates it.
MustReadFile reads a file, panics on error.
MustUserHomeDir is like os.UserHomeDir, but panics on error.
MustWriteFile creates a file with the given mode and contents, also ensuring the containing folder exists.
MustWriteTempFile creates a temporary file with the given contents.
WithMustCreateTempDir calls f passing it the path to a new temporary directory, which is wiped after f returns.
WithMustWriteTempFile calls f passing it the path to a new temporary file, which is wiped after f returns.