Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
6b3b8607
Unverified
Commit
6b3b8607
authored
Jun 23, 2018
by
astaxie
Committed by
GitHub
Jun 23, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into develop
parents
b80b7b06
b21c59ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
app.go
app.go
+2
-2
httplib.go
httplib/httplib.go
+2
-0
logger.go
logs/logger.go
+1
-1
No files found.
app.go
View file @
6b3b8607
...
...
@@ -24,8 +24,8 @@ import (
"net/http/fcgi"
"os"
"path"
"time"
"strings"
"time"
"github.com/astaxie/beego/grace"
"github.com/astaxie/beego/logs"
...
...
@@ -101,7 +101,7 @@ func (app *App) Run(mws ...MiddleWare) {
}
app
.
Server
.
Handler
=
app
.
Handlers
for
i
:=
len
(
mws
)
-
1
;
i
>=
0
;
i
--
{
for
i
:=
len
(
mws
)
-
1
;
i
>=
0
;
i
--
{
if
mws
[
i
]
==
nil
{
continue
}
...
...
httplib/httplib.go
View file @
6b3b8607
...
...
@@ -317,6 +317,7 @@ func (b *BeegoHTTPRequest) Body(data interface{}) *BeegoHTTPRequest {
}
return
b
}
// XMLBody adds request raw body encoding by XML.
func
(
b
*
BeegoHTTPRequest
)
XMLBody
(
obj
interface
{})
(
*
BeegoHTTPRequest
,
error
)
{
if
b
.
req
.
Body
==
nil
&&
obj
!=
nil
{
...
...
@@ -330,6 +331,7 @@ func (b *BeegoHTTPRequest) XMLBody(obj interface{}) (*BeegoHTTPRequest, error) {
}
return
b
,
nil
}
// JSONBody adds request raw body encoding by JSON.
func
(
b
*
BeegoHTTPRequest
)
JSONBody
(
obj
interface
{})
(
*
BeegoHTTPRequest
,
error
)
{
if
b
.
req
.
Body
==
nil
&&
obj
!=
nil
{
...
...
logs/logger.go
View file @
6b3b8607
...
...
@@ -93,7 +93,7 @@ const (
func
formatTimeHeader
(
when
time
.
Time
)
([]
byte
,
int
)
{
y
,
mo
,
d
:=
when
.
Date
()
h
,
mi
,
s
:=
when
.
Clock
()
ns
:=
when
.
Nanosecond
()
/
1000000
ns
:=
when
.
Nanosecond
()
/
1000000
//len("2006/01/02 15:04:05.123 ")==24
var
buf
[
24
]
byte
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment