Documentation
¶
Index ¶
- Constants
- func BuildBinary(suffix string) error
- func DirectoriesInPath(path string) ([]string, error)
- func DirectoryCreate(path string) error
- func DirectoryGetHighestVersion(path string) (string, error)
- func DirectoryIsEmpty(path string) (bool, error)
- func DirectoryRemove(path string) error
- func FileCopy(pathSource, pathDestiny string) error
- func FileCreate(path string, content []byte) error
- func FileDelete(path string) error
- func FileExpand(filePath string, tags []FileExpanderTags) error
- func FileIsEditable(filename string) bool
- func FileRead(path string) ([]byte, error)
- func FileSizeHuman(path string) (string, error)
- func GenerateRandomMessage(s int) ([]byte, error)
- func GenerateRandomStringMessage(s int) (string, error)
- func GetEnvKeyValue(key string) string
- func GetMemoryUsage() string
- func GetModuleName(modPath string) (string, error)
- func ParallelFilter[T any](items []T, matchFn func(T) bool) []T
- func PathExists(path string) (bool, error)
- func Pkill(processName string) error
- func StringNextVersion(currentVersion string) (string, error)
- type FileExpanderTags
- type StructDef
- type StructField
Constants ¶
const ( Size2KB = 2 * 1024 Size4KB = 4 * 1024 Size8KB = 8 * 1024 Size16KB = 16 * 1024 Size32KB = 32 * 1024 Size64KB = 64 * 1024 Size128KB = 128 * 1024 Size256KB = 256 * 1024 Size512KB = 512 * 1024 Size1MB = 1 * 1024 * 1024 Size10MB = 10 * 1024 * 1024 Size100MB = 100 * 1024 * 1024 Size1GB = 1 * 1024 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func BuildBinary ¶
func DirectoriesInPath ¶
DirectoriesInPath returns a list of directories in the given path (first-level only).
func DirectoryCreate ¶
DirectoryCreate creates a new directory with the given path
func DirectoryGetHighestVersion ¶
DirectoryGetHighestVersion finds the directory with the highest numeration (e.g., v1, v2, v100, etc.)
func DirectoryIsEmpty ¶
DirectoryIsEmpty checks if a directory is empty
func DirectoryRemove ¶
DirectoryRemove deletes the directory and its contents
func FileCreate ¶
func FileDelete ¶
func FileExpand ¶
func FileExpand(filePath string, tags []FileExpanderTags) error
func FileIsEditable ¶
func FileSizeHuman ¶
func GenerateRandomMessage ¶
func GetEnvKeyValue ¶
func GetMemoryUsage ¶
func GetMemoryUsage() string
func GetModuleName ¶
GetModuleName reads a go.mod file from the specified path and returns the module name.
func ParallelFilter ¶ added in v0.0.3
func PathExists ¶
func StringNextVersion ¶
Types ¶
type FileExpanderTags ¶
type StructDef ¶
type StructDef struct { Name string Fields []StructField }
StructDef represents the whole struct definition
func StructsExtractFromPackage ¶
StructsExtractFromPackage scans a package directory and extracts struct definitions includePrivate determines whether to include unexported (private) fields limit specifies the maximum number of structs to extract (0 means no limit)
type StructField ¶
StructField represents a field in a struct