mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 15:30:55 +00:00
all: gofmt
Run standard gofmt command on project root. - go version go1.10.3 darwin/amd64 Signed-off-by: ia <isaac.ardis@gmail.com>
This commit is contained in:
parent
f16688817a
commit
87ba3f3cd3
2
app.go
2
app.go
@ -24,8 +24,8 @@ import (
|
|||||||
"net/http/fcgi"
|
"net/http/fcgi"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"time"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/astaxie/beego/grace"
|
"github.com/astaxie/beego/grace"
|
||||||
"github.com/astaxie/beego/logs"
|
"github.com/astaxie/beego/logs"
|
||||||
|
@ -317,6 +317,7 @@ func (b *BeegoHTTPRequest) Body(data interface{}) *BeegoHTTPRequest {
|
|||||||
}
|
}
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
// XMLBody adds request raw body encoding by XML.
|
// XMLBody adds request raw body encoding by XML.
|
||||||
func (b *BeegoHTTPRequest) XMLBody(obj interface{}) (*BeegoHTTPRequest, error) {
|
func (b *BeegoHTTPRequest) XMLBody(obj interface{}) (*BeegoHTTPRequest, error) {
|
||||||
if b.req.Body == nil && obj != nil {
|
if b.req.Body == nil && obj != nil {
|
||||||
@ -330,6 +331,7 @@ func (b *BeegoHTTPRequest) XMLBody(obj interface{}) (*BeegoHTTPRequest, error) {
|
|||||||
}
|
}
|
||||||
return b, nil
|
return b, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// JSONBody adds request raw body encoding by JSON.
|
// JSONBody adds request raw body encoding by JSON.
|
||||||
func (b *BeegoHTTPRequest) JSONBody(obj interface{}) (*BeegoHTTPRequest, error) {
|
func (b *BeegoHTTPRequest) JSONBody(obj interface{}) (*BeegoHTTPRequest, error) {
|
||||||
if b.req.Body == nil && obj != nil {
|
if b.req.Body == nil && obj != nil {
|
||||||
|
@ -17,8 +17,8 @@ package logs
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"time"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -55,7 +55,7 @@ func (r *AccessLogRecord) json() ([]byte, error) {
|
|||||||
func disableEscapeHTML(i interface{}) {
|
func disableEscapeHTML(i interface{}) {
|
||||||
e, ok := i.(interface {
|
e, ok := i.(interface {
|
||||||
SetEscapeHTML(bool)
|
SetEscapeHTML(bool)
|
||||||
});
|
})
|
||||||
if ok {
|
if ok {
|
||||||
e.SetEscapeHTML(false)
|
e.SetEscapeHTML(false)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user