Documentation
¶
Overview ¶
Package utils provides helper functions for working with files, directories and strings that are shared across the proxsave codebase.
Index ¶
- func AbsPath(path string) (string, error)
- func ComputeSHA256(filePath string) (string, error)
- func DirExists(path string) bool
- func EnsureDir(path string) error
- func FileExists(path string) bool
- func FormatBytes(bytes int64) string
- func GenerateRandomString(length int) string
- func GetFileSize(filePath string) (int64, error)
- func IsAbsPath(path string) bool
- func IsComment(line string) bool
- func ParseBool(s string) bool
- func SplitKeyValue(line string) (string, string, bool)
- func TrimQuotes(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeSHA256 ¶
ComputeSHA256 calcola il checksum SHA256 di un file
func FormatBytes ¶
FormatBytes converte bytes in formato human-readable (KB, MB, GB, ecc.)
func GenerateRandomString ¶
GenerateRandomString generates a random string of the specified length
func GetFileSize ¶
GetFileSize restituisce la dimensione di un file in bytes
func SplitKeyValue ¶
SplitKeyValue divide una stringa "key=value" in key e value Supporta anche commenti inline: KEY="value" # comment
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.