mirror of
https://gitee.com/johng/gf.git
synced 2024-11-29 18:57:44 +08:00
README updates
This commit is contained in:
parent
41efc6923e
commit
32b3c443f6
@ -61,7 +61,8 @@ gf是一款模块化、松耦合、轻量级、高性能的Web开发框架。开
|
||||
* [基本语法](http://gf.johng.cn/591643)
|
||||
* [基本函数](http://gf.johng.cn/591644)
|
||||
* [数据库ORM](http://gf.johng.cn/494380)
|
||||
* [数据库配置](http://gf.johng.cn/596222)
|
||||
* [ORM基本介绍](http://gf.johng.cn/606753)
|
||||
* [ORM使用配置](http://gf.johng.cn/596222)
|
||||
* [ORM链式操作](http://gf.johng.cn/596224)
|
||||
* [ORM方法操作](http://gf.johng.cn/596223)
|
||||
* [ORM事务操作](http://gf.johng.cn/596225)
|
||||
|
@ -2,15 +2,18 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gitee.com/johng/gf/g/os/gtime"
|
||||
"gitee.com/johng/gf/g/util/gconv"
|
||||
"time"
|
||||
"reflect"
|
||||
"gitee.com/johng/gf/g"
|
||||
"gitee.com/johng/gf/g/os/glog"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
fmt.Println(reflect.TypeOf(gconv.Time(gtime.Second())))
|
||||
fmt.Println(time.Unix(gtime.Second(), 0).String())
|
||||
|
||||
g.Config().SetPath("/home/john/Workspace/Go/GOPATH/src/gitee.com/johng/gf/geg/frame")
|
||||
db := g.Database()
|
||||
if r, err := db.Table("goods").Where("id=?", 1).One(); err == nil {
|
||||
fmt.Printf("goods id: %d\n", r["id"].Int())
|
||||
fmt.Printf("goods title: %s\n", r["title"].String())
|
||||
fmt.Printf("goods proce: %.2f\n", r["price"].Float32())
|
||||
} else {
|
||||
glog.Error(err)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user