Documentation ¶
Index ¶
- func AppendFile(dir, filename string, data []byte, offset int64) error
- func CopyFile(src, dst string, force bool) error
- func CreateDir(dir string) error
- func GetFileInfo(filename string) (*types.File, error)
- func GetLogger(level, encoding string, showFullCaller bool, callerSkip int, ...) *zap.Logger
- func IsDirExists(dirname string) bool
- func IsFileExists(filename string) bool
- func RemoveFile(file string) error
- func StructToMap(data interface{}) map[string]interface{}
- func ToDuration(duration string, defaultDuration time.Duration) time.Duration
- func WriteFile(dir, filename string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFile ¶
AppendFile func
func GetLogger ¶
func GetLogger(level, encoding string, showFullCaller bool, callerSkip int, enableStacktrace bool) *zap.Logger
GetLogger returns a logger
func IsDirExists ¶
IsDirExists checks the directory availability
func IsFileExists ¶
IsFileExists checks the file availability
func StructToMap ¶
func StructToMap(data interface{}) map[string]interface{}
StructToMap converts struct to a map
func ToDuration ¶
ToDuration converts the string duration to time.Duration, if failed returns the default
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.