format code
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user