utils

package
v0.0.0-...-5c5f118 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 14 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)

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