utils

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(originalPath string, targetPath string) error

func DirExistOrCreate

func DirExistOrCreate(dirName string) (err error)

func ErrorRecover

func ErrorRecover(message string)

func FileExist

func FileExist(path string) bool

func FileExistOrCreate

func FileExistOrCreate(fileName string) (err error)

func GetDirFileNames

func GetDirFileNames(dirName string) (names []string, err error)

func GetDirFileNames2

func GetDirFileNames2(dirName string) (names []string, err error)

func GetDirsNames

func GetDirsNames(dirName string) (names []string, err error)

func GetDirsNames2

func GetDirsNames2(dirName string) (names []string, err error)

func GetNumberBool

func GetNumberBool(value bool) float64

func InterfaceToStruct

func InterfaceToStruct(object interface{}, result interface{}) (err error)

func ReadFile

func ReadFile(filePath string) (content string, err error)

func ReadFileTail

func ReadFileTail(filename string, n int) ([]string, error)

func ReadFileToObject

func ReadFileToObject(filePath string, object any) (err error)

func ReadFilekeyToObject

func ReadFilekeyToObject(filePath, key string, object any) (err error)

func RemoveAll

func RemoveAll(dirName string) (err error)

func RemoveFile

func RemoveFile(dirName string) (err error)

func ToJson

func ToJson(object interface{}) (result string, err error)

func ToJson2

func ToJson2(object interface{}) (result string)

func ToJson3

func ToJson3(object interface{}) (result string)

func WriteObjectToFile

func WriteObjectToFile(filename string, object any) (err error)

func WriteObjectToFile2

func WriteObjectToFile2(filename string, object any) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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