mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
fix issue in gres.UnpackContent; fix issue in gtime.NewFromTimeStamp
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user