Documentation
¶
Index ¶
- Variables
- func ExitWithError(format string, args ...any)
- func FindIndexOf[T comparable](slice []T, what T) (int, bool)
- func GetPath() string
- func IsValidFolder(path string) bool
- func List() ([]string, error)
- func NormalizePath(filePath string, root string) string
- func NormalizePathWithExt(filePath, rootPath, ext string) string
- func Perror(format string, args ...any)
- func RemoveAtIndex[T comparable](slice []T, index int) []T
- func TgzCompress(source, target string) error
- func TgzExtract(source, target string) error
- func TgzList(source string) error
- func TrimString(s string, length int) string
- func Unique(s []string) []string
- func ZipCompress(source, target string) error
- func ZipExtract(source, target string) error
- func ZipList(source string) error
- type Traverse
- type TraverseCallback
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InstallerName = installerName InstallerPath = GetPath() )
Functions ¶
func ExitWithError ¶
func FindIndexOf ¶
func FindIndexOf[T comparable](slice []T, what T) (int, bool)
func IsValidFolder ¶
func NormalizePath ¶
func NormalizePathWithExt ¶
func RemoveAtIndex ¶
func RemoveAtIndex[T comparable](slice []T, index int) []T
func TgzCompress ¶
Compress the source folder to the target .tgz archive file
func TgzExtract ¶
func TrimString ¶
func ZipCompress ¶
func ZipExtract ¶
Types ¶
type Traverse ¶
type Traverse struct {
Root string
EnterFolder TraverseCallback
ExitFolder TraverseCallback
ProcessFile TraverseCallback
}
func NewTraverse ¶
func (*Traverse) WithOnEnterFolder ¶
func (t *Traverse) WithOnEnterFolder(OnEnter TraverseCallback) *Traverse
func (*Traverse) WithOnExitFolder ¶
func (t *Traverse) WithOnExitFolder(OnExit TraverseCallback) *Traverse
func (*Traverse) WithProcessFile ¶
func (t *Traverse) WithProcessFile(Process TraverseCallback) *Traverse
type TraverseCallback ¶
Click to show internal directories.
Click to hide internal directories.