mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:20:55 +00:00
gofmt -s -w .
This commit is contained in:
parent
bed1d9bd27
commit
68311b286e
@ -409,10 +409,10 @@ func (b *BeegoHTTPRequest) DoRequest() (*http.Response, error) {
|
|||||||
if trans == nil {
|
if trans == nil {
|
||||||
// create default transport
|
// create default transport
|
||||||
trans = &http.Transport{
|
trans = &http.Transport{
|
||||||
TLSClientConfig: b.setting.TLSClientConfig,
|
TLSClientConfig: b.setting.TLSClientConfig,
|
||||||
Proxy: b.setting.Proxy,
|
Proxy: b.setting.Proxy,
|
||||||
Dial: TimeoutDialer(b.setting.ConnectTimeout, b.setting.ReadWriteTimeout),
|
Dial: TimeoutDialer(b.setting.ConnectTimeout, b.setting.ReadWriteTimeout),
|
||||||
MaxIdleConnsPerHost: -1,
|
MaxIdleConnsPerHost: -1,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if b.transport is *http.Transport then set the settings.
|
// if b.transport is *http.Transport then set the settings.
|
||||||
|
@ -25,7 +25,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
csiState int
|
csiState int
|
||||||
parseResult int
|
parseResult int
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ func changeColor(param []byte) parseResult {
|
|||||||
case ansiBlinkOff:
|
case ansiBlinkOff:
|
||||||
winAttr.backgroundIntensity = 0
|
winAttr.backgroundIntensity = 0
|
||||||
default:
|
default:
|
||||||
// unknown code
|
// unknown code
|
||||||
}
|
}
|
||||||
case c.drawType == foreground:
|
case c.drawType == foreground:
|
||||||
winAttr.foregroundColor = c.code
|
winAttr.foregroundColor = c.code
|
||||||
@ -420,7 +420,7 @@ func (cw *ansiColorWriter) Write(p []byte) (int, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if cw.mode != DiscardNonColorEscSeq || cw.state == outsideCsiCode {
|
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
|
r += nw
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,9 +95,7 @@ func formatTimeHeader(when time.Time) ([]byte, int) {
|
|||||||
//len("2006/01/02 15:04:05 ")==20
|
//len("2006/01/02 15:04:05 ")==20
|
||||||
var buf [20]byte
|
var buf [20]byte
|
||||||
|
|
||||||
//change to '3' after 984 years, LOL
|
|
||||||
buf[0] = y1[y/1000%10]
|
buf[0] = y1[y/1000%10]
|
||||||
//change to '1' after 84 years, LOL
|
|
||||||
buf[1] = y2[y/100]
|
buf[1] = y2[y/100]
|
||||||
buf[2] = y3[y-y/100*100]
|
buf[2] = y3[y-y/100*100]
|
||||||
buf[3] = y4[y-y/100*100]
|
buf[3] = y4[y-y/100*100]
|
||||||
|
@ -2062,7 +2062,7 @@ func TestIntegerPk(t *testing.T) {
|
|||||||
throwFail(t, AssertIs(out.Value, intPk.Value))
|
throwFail(t, AssertIs(out.Value, intPk.Value))
|
||||||
}
|
}
|
||||||
|
|
||||||
num, err = dORM.InsertMulti(1, []*IntegerPk{&IntegerPk{
|
num, err = dORM.InsertMulti(1, []*IntegerPk{{
|
||||||
ID: 1, Value: "ok",
|
ID: 1, Value: "ok",
|
||||||
}})
|
}})
|
||||||
throwFail(t, err)
|
throwFail(t, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user