Versions in this module Expand all Collapse all v1 v1.0.2 Oct 14, 2024 v1.0.1 Sep 29, 2024 Changes in this version + const TextBlack + const TextBlue + const TextCyan + const TextGreen + const TextMagenta + const TextRed + const TextWhite + const TextYellow + func Base64ToImage(imageBase64 string) ([]byte, error) + func Black(msg string) string + func Blue(msg string) string + func CheckExist(src string) bool + func CheckPermission(src string) bool + func Cyan(msg string) string + func FileCreate(content bytes.Buffer, name string) + func FileMonitoringById(ctx context.Context, filePth string, id string, group string, ...) + func GenerateRandomKey16() string + func GenerateRandomKey20() string + func GenerateRandomKey6() string + func GetCurrentPath() string + func GetCurrentTime() time.Time + func GetCurrentTimeStamp() int64 + func GetCurrentTimeStr() string + func GetDirFiles(dir string) ([]string, error) + func GetExt(fileName string) string + func GetFileSize(filename string) int64 + func GetImgType(p string) (string, error) + func GetLocaHonst() string + func GetLocation(ip, key string) string + func GetSize(f multipart.File) (int, error) + func GetType(p string) (string, error) + func GetUUID() string + func Green(msg string) string + func Hmac(data string) string + func HttpGetJson(url string, param map[string]string, header map[string]string, ...) error + func HttpPostJson(url string, param map[string]interface{}, header map[string]string, ...) error + func HttpPostXml(url string, param url.Values, header ...map[string]string) ([]byte, error) + func If(flag bool, a, b interface{}) interface + func IsNotExistMkDir(src string) error + func IsStringEmpty(str string) bool + func Magenta(msg string) string + func MkDir(src string) error + func Open(name string, flag int, perm os.FileMode) (*os.File, error) + func PathCreate(dir string) error + func PathExist(addr string) bool + func PathExists(path string) bool + func Red(msg string) string + func RemoveRepByMap(slc []string) []string + func SetColor(msg string, conf, bg, text int) string + func SetPassword(password string, salt string) (verify string, err error) + func StringToInt(e string) (int, error) + func StructToJsonStr(e interface{}) (string, error) + func Translate(form, to interface{}) + func White(msg string) string + func Yellow(msg string) string + type APIException struct + Code int + Msg string + Result interface{} + Success bool + Timestamp int64 + func AuthError(message string) *APIException + func NotFound() *APIException + func ParameterError(message string) *APIException + func ResponseJson(message string, data interface{}, success bool) *APIException + func ServerError() *APIException + func UnknownError(message string) *APIException + func (e *APIException) Error() string + type JSONTime struct + func (t *JSONTime) Scan(v interface{}) error + func (t JSONTime) MarshalJSON() ([]byte, error) + func (t JSONTime) Value() (driver.Value, error) + type ReplaceHelper struct + NewText string + OldText string + Root string + func (h *ReplaceHelper) DoWrok() error