Documentation ¶
Index ¶
- func AmountConvert(pMoney float64, pRound bool) string
- func Base64X(fileName string) string
- func DrawExcel(jsonUrl, xlsxUrl string, dataInfo map[string]gjson.Result, ...) (string, error)
- func GetCurrentDirectory() string
- func GetMySqlDB(drive string) *gorm.DB
- func GetNanoTimeLabel() (cur string)
- func GetNow() time.Time
- func GetParentDirectory(dirctory string) string
- func GetRandName() string
- func GetSqlServerDB(drive string) (string, *gorm.DB)
- func GetToday() string
- func GetYL() string
- func InitLogger(filename string) *zap.SugaredLogger
- func IsFileExist1(filename string) bool
- func IsFileExist2(filename string, filesize int64) bool
- func IsFileExist3(filename string, limitSize int64) bool
- func JoinAbsX(folderPath string, filename string) string
- func JoinX(folderName string, filename string) string
- func PostJson(url string, data interface{}) (string, error)
- func RandInt64(min, max int64) int64
- func RandNumber(n int) string
- func RandomTime() string
- func RandomTime2(n int64) time.Time
- func UUIDString() string
- func Upload(localFile string, keyToOverwrite string, expires uint64) (string, error)
- type Qiniu
- type ResultModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrawExcel ¶
func DrawExcel(jsonUrl, xlsxUrl string, dataInfo map[string]gjson.Result, dataDetail []gjson.Result) (string, error)
DrawExcel 绘制模板 下载模板的时候,增加了随机数,确保拿到最新的模板
func InitLogger ¶
func InitLogger(filename string) *zap.SugaredLogger
InitLogger Zap var sugarLogger *zap.SugaredLogger sugarLogger = InitLogger("./test1.log") defer sugarLogger.Sync() sugarLogger.Infof("Success! statusCode = %s for URL %s", resp.Status, url)
func IsFileExist2 ¶
IsFileExist2 严格版本:判断文件是否存在,如果存在 & 大小不同,删除。
func IsFileExist3 ¶
IsFileExist3 版本:如果存在 & < limitSize,删除。
Types ¶
type Qiniu ¶
type ResultModel ¶
type ResultModel struct { Code int `json:"code"` Msg string `json:"msg"` Count int `json:"count"` Data interface{} `json:"data"` }
ResultModel 通用返回值的结构体
Click to show internal directories.
Click to hide internal directories.