Documentation ¶
Index ¶
- Variables
- func FileExists(f string) bool
- func FsAbs(f string) string
- func GetCurrentDir() string
- func HclLoad(f string, cfg any) error
- func IonLoad(f string, cfg any) error
- func IsIonFile(f string) bool
- func JsonDecode[T string | []byte](b T, v any) error
- func JsonLoad(f string, cfg any) error
- func Loggers() (Debug *log.Logger, Warn *log.Logger, Info *log.Logger)
- func MapJoin(m map[string]string, kvGlue, glue string) string
- func MapMerge(m1, m2 map[string]string) map[string]string
- func Mkdir(d string) error
- func MkdirIfNotExists(d string) error
- func RecurseDir(absDir string, cb func(absName string, file *os.File) error) error
- func RunScriptCode(code string, args ...any) (map[string]any, error)
- func ToEnvKey(k string) string
- func ToPropKey(k string) string
- func Uncompress(archiveFileName, dstDirName string) error
- func Untgz(fileName, dir string) error
- func Unzip(zipFileName, dstDirName string) error
- func Zip(srcDir string, writer io.Writer, include []string) error
- type CircularDependencyDetector
- type PB
Constants ¶
This section is empty.
Variables ¶
View Source
var (
FileNotFoundError = fmt.Errorf("file not found")
)
Functions ¶
func FileExists ¶
func GetCurrentDir ¶
func GetCurrentDir() string
func JsonDecode ¶
jsonDecode decodes json and returns pointer of R type passed e.g.1:
myTypePtr, err := jsonDecode(`{"fld1": "Val1"}`, MyType{})
e.g.2:
mapPtr, err := jsonDecode(`{"fld1": "Val1"}`, make(map[string]string)) m := *mapPtr fmt.Println(m["fld1"])
func MapMerge ¶
mapMerge merges m1 with the value of m2 without modifying the original map. The values of m2 will override any duplicate values of m1
func MkdirIfNotExists ¶
func RecurseDir ¶
RecurseDir loop throguh all files and directories recursively. cb is called back with the name and the open file
func Uncompress ¶
Types ¶
type CircularDependencyDetector ¶
type CircularDependencyDetector struct {
// contains filtered or unexported fields
}
func NewCircularDependencyDetector ¶
func NewCircularDependencyDetector() *CircularDependencyDetector
func (*CircularDependencyDetector) Clone ¶
func (c *CircularDependencyDetector) Clone() *CircularDependencyDetector
func (*CircularDependencyDetector) Push ¶
func (c *CircularDependencyDetector) Push(item string) error
Click to show internal directories.
Click to hide internal directories.