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
68311b28
Commit
68311b28
authored
Aug 17, 2016
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gofmt -s -w .
parent
bed1d9bd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
16 deletions
+11
-16
httplib.go
httplib/httplib.go
+4
-4
color.go
logs/color.go
+1
-2
color_windows.go
logs/color_windows.go
+4
-5
color_windows_test.go
logs/color_windows_test.go
+1
-2
logger.go
logs/logger.go
+0
-2
orm_test.go
orm/orm_test.go
+1
-1
No files found.
httplib/httplib.go
View file @
68311b28
...
...
@@ -409,10 +409,10 @@ func (b *BeegoHTTPRequest) DoRequest() (*http.Response, error) {
if
trans
==
nil
{
// create default transport
trans
=
&
http
.
Transport
{
TLSClientConfig
:
b
.
setting
.
TLSClientConfig
,
Proxy
:
b
.
setting
.
Proxy
,
Dial
:
TimeoutDialer
(
b
.
setting
.
ConnectTimeout
,
b
.
setting
.
ReadWriteTimeout
),
MaxIdleConnsPerHost
:
-
1
,
TLSClientConfig
:
b
.
setting
.
TLSClientConfig
,
Proxy
:
b
.
setting
.
Proxy
,
Dial
:
TimeoutDialer
(
b
.
setting
.
ConnectTimeout
,
b
.
setting
.
ReadWriteTimeout
),
MaxIdleConnsPerHost
:
-
1
,
}
}
else
{
// if b.transport is *http.Transport then set the settings.
...
...
logs/color.go
View file @
68311b28
...
...
@@ -25,4 +25,4 @@ type ansiColorWriter struct {
func
(
cw
*
ansiColorWriter
)
Write
(
p
[]
byte
)
(
int
,
error
)
{
return
cw
.
w
.
Write
(
p
)
}
\ No newline at end of file
}
logs/color_windows.go
View file @
68311b28
...
...
@@ -25,7 +25,7 @@ import (
)
type
(
csiState
int
csiState
int
parseResult
int
)
...
...
@@ -294,7 +294,7 @@ func changeColor(param []byte) parseResult {
case
ansiBlinkOff
:
winAttr
.
backgroundIntensity
=
0
default
:
// unknown code
// unknown code
}
case
c
.
drawType
==
foreground
:
winAttr
.
foregroundColor
=
c
.
code
...
...
@@ -420,9 +420,9 @@ func (cw *ansiColorWriter) Write(p []byte) (int, error) {
}
if
cw
.
mode
!=
DiscardNonColorEscSeq
||
cw
.
state
==
outsideCsiCode
{
nw
,
err
=
cw
.
w
.
Write
(
p
[
first
:
len
(
p
)
])
nw
,
err
=
cw
.
w
.
Write
(
p
[
first
:
])
r
+=
nw
}
return
r
,
err
}
\ No newline at end of file
}
logs/color_windows_test.go
View file @
68311b28
...
...
@@ -291,4 +291,4 @@ func TestIgnoreUnknownSequences(t *testing.T) {
if
actualTail
!=
expectedTail
{
t
.
Errorf
(
"Get %q, want %q"
,
actualTail
,
expectedTail
)
}
}
\ No newline at end of file
}
logs/logger.go
View file @
68311b28
...
...
@@ -95,9 +95,7 @@ func formatTimeHeader(when time.Time) ([]byte, int) {
//len("2006/01/02 15:04:05 ")==20
var
buf
[
20
]
byte
//change to '3' after 984 years, LOL
buf
[
0
]
=
y1
[
y
/
1000
%
10
]
//change to '1' after 84 years, LOL
buf
[
1
]
=
y2
[
y
/
100
]
buf
[
2
]
=
y3
[
y
-
y
/
100
*
100
]
buf
[
3
]
=
y4
[
y
-
y
/
100
*
100
]
...
...
orm/orm_test.go
View file @
68311b28
...
...
@@ -2062,7 +2062,7 @@ func TestIntegerPk(t *testing.T) {
throwFail
(
t
,
AssertIs
(
out
.
Value
,
intPk
.
Value
))
}
num
,
err
=
dORM
.
InsertMulti
(
1
,
[]
*
IntegerPk
{
&
IntegerPk
{
num
,
err
=
dORM
.
InsertMulti
(
1
,
[]
*
IntegerPk
{{
ID
:
1
,
Value
:
"ok"
,
}})
throwFail
(
t
,
err
)
...
...
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