utils

package
v2.0.23 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEmptyFile

func CreateEmptyFile(path string) (err error)

func CreateFile

func CreateFile(path string) (err error)

func Executable

func Executable() (exe string)

func FileBase

func FileBase(path string, ext string) string

func FilterDirectories

func FilterDirectories(paths []string) []string

func Get

func Get[E comparable](v E, fallback E) E

func GetIndex

func GetIndex[S ~[]E, E any](s S, index int, fallback E) E

func Getwd

func Getwd() string

func MakeDirnameAvailableValidator

func MakeDirnameAvailableValidator(parentDir string) func(string) error

func PanicIfError

func PanicIfError(err error)

func PanicIfFalse

func PanicIfFalse(condition bool, message string)

func PanicIfPathDoesNotExist

func PanicIfPathDoesNotExist(path string)

func PanicIfPathExists

func PanicIfPathExists(path string)

func PanicIfTrue

func PanicIfTrue(condition bool, message string)

func PathExists

func PathExists(filename string) bool

func PathIsDir

func PathIsDir(filename string) bool

func PathIsFile

func PathIsFile(filename string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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