package lumberjack_afero import ( "errors" "github.com/spf13/afero" "os" "path/filepath" ) // To make sure no 'os' package used in lumberjack_afero.go, // that we can easily check no filesystem access by 'os' package. const ( O_CREATE = os.O_CREATE O_WRONLY = os.O_WRONLY O_TRUNC = os.O_TRUNC O_APPEND = os.O_APPEND ) func getProcessName() string { return filepath.Base(os.Args[0]) } func IsNotExist(err error) bool { return errors.Is(err, afero.ErrFileNotFound) }