Versions in this module Expand all Collapse all v1 v1.0.1 Apr 25, 2023 Changes in this version + const LoggerKey + const TextBlack + const TextBlue + const TextCyan + const TextGreen + const TextMagenta + const TextRed + const TextWhite + const TextYellow + const TrafficKey + func Assert(condition bool, msg string, code ...int) + func Black(msg string) string + func Blue(msg string) string + func CompareHashAndPassword(e string, p string) (bool, error) + func Cyan(msg string) string + func FileCreate(content bytes.Buffer, name string) + func FileMonitoringById(ctx context.Context, filePth string, id string, group string, ...) + func GenerateMsgIDFromContext(c *gin.Context) string + func GenerateRandomKey16() string + func GenerateRandomKey20() string + func GenerateRandomKey6() string + func Get(url string) (string, error) + func GetCurrentPath() string + func GetCurrentTime() time.Time + func GetCurrentTimeStr() string + func GetFileSize(filename string) int64 + func GetLocaHonst() string + func GetLocation(ip, key string) string + func GetOrm(c *gin.Context) (*gorm.DB, error) + func Green(msg string) string + func HasError(err error, msg string, code ...int) + func IdsStrToIdsIntGroup(key string, c *gin.Context) []int + func IdsStrToIdsIntGroupStr(keys string) []int + func Int64ToString(e int64) string + func IntToString(e int) string + func Magenta(msg string) string + func PathCreate(dir string) error + func PathExist(addr string) bool + func Post(url string, data interface{}, contentType string) ([]byte, error) + func Red(msg string) string + func Round(f float64, n int) float64 + 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 UIntToString(e uint) string + func White(msg string) string + func Yellow(msg string) string + type Ids struct + Ids []int + type Mode string + const ModeDev + const ModeProd + const ModeTest + const Mysql + const Sqlite + func (e Mode) String() string + type ReplaceHelper struct + NewText string + OldText string + Root string + func (h *ReplaceHelper) DoWrok() error