util

package
v0.0.0-...-c6d80bb Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoCd

func AutoCd(dir string) string

func AutoDetectLanguage

func AutoDetectLanguage(srcDir string) (string, error)

func CopyDir

func CopyDir(srcPath, destPath string)

func ExtensionToLanguge

func ExtensionToLanguge(ext string) (lang string, err error)

func FilterSrcsByLang

func FilterSrcsByLang(dir string, langExpected string) ([]string, error)

func IsDirEmpty

func IsDirEmpty(dir string) bool

func IsDirExists

func IsDirExists(dir string) bool

func IsZip

func IsZip(file string) (bool, error)

func ListDir

func ListDir(dir string) ([]string, error)

func MakeTempfolder

func MakeTempfolder() string

func PrintStruct

func PrintStruct(object interface{})

func Unzip

func Unzip(srcFile, destDir string) ([]string, error)

Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2).

func WalkDir

func WalkDir(dir string) ([]string, error)

func ZipDir

func ZipDir(filename string, dir string) error

func ZipFiles

func ZipFiles(filename string, files []string) error

Types

type Logger

type Logger struct {
	BasePath string
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(basePath string) *Logger

func (*Logger) LogTo

func (logger *Logger) LogTo(midPath, fileName string, data string)

Jump to

Keyboard shortcuts

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