utils

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExcludedDirs = map[string]bool{
	".stryker-tmp":  true,
	"node_modules":  true,
	"dist":          true,
	"build":         true,
	"__pycache__":   true,
	".pytest_cache": true,
	"target":        true,
	".git":          true,
	"coverage":      true,
	".nyc_output":   true,
	".next":         true,
	".nuxt":         true,
	"vendor":        true,
	".venv":         true,
	"venv":          true,
	"env":           true,
	".env":          true,
	".idea":         true,
	".vscode":       true,
	".gradle":       true,
	".mvn":          true,
	"bin":           true,
	"obj":           true,
	"out":           true,
	".cache":        true,
	"tmp":           true,
	"temp":          true,
	".terraform":    true,
	".serverless":   true,
	".aws-sam":      true,
}

ExcludedDirs is a set of directory names to exclude from traversal

Functions

func ExpandPath

func ExpandPath(path string) (string, error)

ExpandPath expands ~ to home directory and resolves to absolute path

func FormatSize

func FormatSize(bytes int64) string

FormatSize formats a byte count into a human-readable string

func IsExcludedDir

func IsExcludedDir(name string) bool

IsExcludedDir checks if a directory name should be excluded

func IsValidDirPath

func IsValidDirPath(path string) bool

IsValidDirPath checks if a path points to an existing directory

func IsValidFilePath

func IsValidFilePath(path string) bool

IsValidFilePath checks if a path points to an existing file

func NormalizePath

func NormalizePath(path string) string

NormalizePath normalizes a file path for consistent comparison

func ParseSize

func ParseSize(s string) (int64, error)

ParseSize parses a human-readable size string to bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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