1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-12 12:50:40 +00:00

gofmt simplify

This commit is contained in:
astaxie
2017-04-20 10:56:09 +08:00
parent e7e3ca77ad
commit 453691728a
5 changed files with 8 additions and 9 deletions

View File

@ -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
}

View File

@ -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")