utils

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: Apache-2.0 Imports: 9 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileHasWrongExtension       = errors.New("file has wrong extension")
	ErrFileIsHidden                = errors.New("file is hidden")
	ErrFileNoExecutablePermissions = errors.New("no executable permissions, chmod +x is required to run this hook")
)

Functions

func CheckExecutablePermissions added in v1.6.0

func CheckExecutablePermissions(f os.FileInfo) error

func DirExists

func DirExists(path string) bool

DirExists checking for directory existence return bool value

func EnsureTempDirectory added in v1.4.0

func EnsureTempDirectory(inDir string) (string, error)

func FileExists

func FileExists(path string) (bool, error)

FileExists returns true if path exists

func RecursiveCheckLibDirectory added in v1.4.8

func RecursiveCheckLibDirectory(dir string) error

RecursiveCheckLibDirectory finds recursively all executable files inside a lib directory. And will log warning with these files.

func RecursiveGetExecutablePaths

func RecursiveGetExecutablePaths(dir string, excludedDirs ...string) ([]string, error)

RecursiveGetExecutablePaths finds recursively all executable files inside a dir directory. Hidden directories and files are ignored.

func RequireExistingDirectory added in v1.4.0

func RequireExistingDirectory(inDir string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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