1234567891011121314151617181920 |
- package test
- import (
- "fmt"
- "github.com/astaxie/beego/cache"
- _ "github.com/astaxie/beego/cache/redis"
- "testing"
- "time"
- )
- var Cache cache.Cache
- func TestBeego(t *testing.T) {
- dd, _ := time.ParseDuration(fmt.Sprintf("-%dh", 24*30*1))
- dd1 := time.Now().Add(dd)
- println(int(dd1.Month()))
- xx := fmt.Sprintf("warning_%d_%02d", int(dd1.Year()), int(dd1.Month()))
- println(xx)
- }
|