utils

package
v0.0.0-...-091dabd Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CST = time.FixedZone("CST", 8*3600)
View Source
var (
	ErrNotFoundMod = errors.New("not found mod file path")
)

Functions

func CheckErrWithStatus

func CheckErrWithStatus(err error)

func CheckExist

func CheckExist(p string) bool

func CheckFile

func CheckFile(fp string) error

func CheckFolder

func CheckFolder(fp string) error

func CopyDir

func CopyDir(src, dst string) error

func CopyFile

func CopyFile(src, dst string) error

func CurrentDir

func CurrentDir() string

func Error

func Error(err error)

func ExtractInitials

func ExtractInitials(s string) string

func FindModPath

func FindModPath(deep int) (string, error)

func GetModName

func GetModName() (mod string)

func InStrArr

func InStrArr(arr []string, aim string) bool

func Info

func Info(s string)

func LoadFiles

func LoadFiles(dir string, filter func(filename string) bool) (filenames []string)

func ParseStruct

func ParseStruct(filename string, src []byte) (structMap map[string]StructFields, err error)

func RemoveExt

func RemoveExt(filename string) string

func SaveToFile

func SaveToFile(p string, cnt []byte, cover bool) (err error)

func Tar

func Tar(sources []string, target string) error

Tar creates a tarball from the source directories/files and writes it to the target file.

Types

type StructFields

type StructFields []*ast.Field

Jump to

Keyboard shortcuts

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