fix issue in gres.UnpackContent; fix issue in gtime.NewFromTimeStamp

This commit is contained in:
John
2020-02-04 17:09:18 +08:00
parent 4c3af63076
commit 4d2b244319
8 changed files with 81 additions and 35 deletions

View File

@ -1,30 +1,15 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/os/glog"
"fmt"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/util/gconv"
)
func main() {
s := g.Server()
s.Group("/api.v2", func(group *ghttp.RouterGroup) {
group.ALL("/user/list", func(r *ghttp.Request) {
glog.Debug(r.Method, r.RequestURI)
paramKey := "X-CSRF-Token"
// // www-form or query
// glog.Debug("go:", r.Request.FormValue(paramKey))
// // post form-data
// glog.Debug("go form:", r.Request.PostFormValue(paramKey))
glog.Debug("gf GetString:", r.GetString(paramKey))
glog.Debug("gf GetFormString:", r.GetFormString(paramKey))
r.Response.Writeln("list")
})
})
s.SetPort(8199)
s.Run()
t1 := gconv.Convert(1989, "Time")
t2 := gconv.Time("2033-01-11 04:00:00 +0800 CST")
fmt.Println(gtime.Timestamp())
fmt.Println(t1)
fmt.Println(t2)
}