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
45369172
Commit
45369172
authored
Apr 20, 2017
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gofmt simplify
parent
e7e3ca77
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
9 deletions
+8
-9
input_test.go
context/input_test.go
+2
-2
controller_test.go
controller_test.go
+2
-2
signature.go
logs/alils/signature.go
+1
-2
file_test.go
logs/file_test.go
+2
-2
statistics.go
toolbox/statistics.go
+1
-1
No files found.
context/input_test.go
View file @
45369172
...
...
@@ -73,8 +73,8 @@ func TestBind(t *testing.T) {
{
"/?human.ID=888&human.Nick=astaxie&human.Ms=true&human[Pwd]=pass"
,
[]
testItem
{{
"human"
,
Human
{},
Human
{
ID
:
888
,
Nick
:
"astaxie"
,
Ms
:
true
,
Pwd
:
"pass"
}}}},
{
"/?human[0].ID=888&human[0].Nick=astaxie&human[0].Ms=true&human[0][Pwd]=pass01&human[1].ID=999&human[1].Nick=ysqi&human[1].Ms=On&human[1].Pwd=pass02"
,
[]
testItem
{{
"human"
,
[]
Human
{},
[]
Human
{
Human
{
ID
:
888
,
Nick
:
"astaxie"
,
Ms
:
true
,
Pwd
:
"pass01"
},
Human
{
ID
:
999
,
Nick
:
"ysqi"
,
Ms
:
true
,
Pwd
:
"pass02"
},
{
ID
:
888
,
Nick
:
"astaxie"
,
Ms
:
true
,
Pwd
:
"pass01"
},
{
ID
:
999
,
Nick
:
"ysqi"
,
Ms
:
true
,
Pwd
:
"pass02"
},
}}}},
{
...
...
controller_test.go
View file @
45369172
...
...
@@ -172,10 +172,10 @@ func TestAdditionalViewPaths(t *testing.T) {
t
.
Fatal
(
"TestAdditionalViewPaths expected error"
)
}
}()
ctrl
.
RenderString
()
;
ctrl
.
RenderString
()
}()
ctrl
.
TplName
=
"file2.tpl"
ctrl
.
ViewPath
=
dir2
ctrl
.
RenderString
()
;
ctrl
.
RenderString
()
}
logs/alils/signature.go
View file @
45369172
...
...
@@ -76,7 +76,7 @@ func signature(project *LogProject, method, uri string,
var
keys
sort
.
StringSlice
vals
:=
u
.
Query
()
for
k
,
_
:=
range
vals
{
for
k
:=
range
vals
{
keys
=
append
(
keys
,
k
)
}
...
...
@@ -109,4 +109,3 @@ func signature(project *LogProject, method, uri string,
digest
=
base64
.
StdEncoding
.
EncodeToString
(
mac
.
Sum
(
nil
))
return
}
logs/file_test.go
View file @
45369172
...
...
@@ -162,7 +162,7 @@ func TestFileRotate_05(t *testing.T) {
testFileDailyRotate
(
t
,
fn1
,
fn2
)
os
.
Remove
(
fn
)
}
func
TestFileRotate_06
(
t
*
testing
.
T
)
{
//test file mode
func
TestFileRotate_06
(
t
*
testing
.
T
)
{
//test file mode
log
:=
NewLogger
(
10000
)
log
.
SetLogger
(
"file"
,
`{"filename":"test3.log","maxlines":4}`
)
log
.
Debug
(
"debug"
)
...
...
@@ -174,7 +174,7 @@ func TestFileRotate_06(t *testing.T) {//test file mode
log
.
Critical
(
"critical"
)
log
.
Emergency
(
"emergency"
)
rotateName
:=
"test3"
+
fmt
.
Sprintf
(
".%s.%03d"
,
time
.
Now
()
.
Format
(
"2006-01-02"
),
1
)
+
".log"
s
,
_
:=
os
.
Lstat
(
rotateName
)
s
,
_
:=
os
.
Lstat
(
rotateName
)
if
s
.
Mode
()
!=
0440
{
os
.
Remove
(
rotateName
)
os
.
Remove
(
"test3.log"
)
...
...
toolbox/statistics.go
View file @
45369172
...
...
@@ -119,7 +119,7 @@ func (m *URLMap) GetMap() map[string]interface{} {
func
(
m
*
URLMap
)
GetMapData
()
[]
map
[
string
]
interface
{}
{
m
.
lock
.
Lock
()
defer
m
.
lock
.
Unlock
()
var
resultLists
[]
map
[
string
]
interface
{}
for
k
,
v
:=
range
m
.
urlmap
{
...
...
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