format code

This commit is contained in:
MaysWind
2021-01-03 14:41:01 +08:00
parent bca219a09a
commit 42b302c58b
5 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ func PrintJsonSuccessResult(c *core.Context, result interface{}) {
// PrintDataSuccessResult writes success response in custom content type to current http context
func PrintDataSuccessResult(c *core.Context, contentType string, fileName string, result []byte) {
if fileName != "" {
c.Header("Content-Disposition", "attachment;filename=" + fileName)
c.Header("Content-Disposition", "attachment;filename="+fileName)
}
c.Data(http.StatusOK, contentType, result)
+2 -2
View File
@@ -3,8 +3,8 @@ package utils
import "time"
const (
unixTimeFormat = "1136239445"
longDateTimeFormat = "2006-01-02 15:04:05"
unixTimeFormat = "1136239445"
longDateTimeFormat = "2006-01-02 15:04:05"
longDateTimeWithoutSecondFormat = "2006-01-02 15:04"
)