优化日志及config
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
. "code.hoteas.com/golang/hotime"
|
||||
. "code.hoteas.com/golang/hotime/common"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
appIns := Init("config/config.json")
|
||||
appIns.Run(Router{"app": Proj{
|
||||
"user": Ctr{
|
||||
"test": func(that *Context) {
|
||||
fmt.Println("dasdasd")
|
||||
id := that.Db.Insert("user", Map{"name": "test"})
|
||||
ok := that.Db.Update("user", Map{"name": "test1"}, Map{"name": "test"})
|
||||
ps := that.Db.Select("user", "*")
|
||||
p := that.Db.Get("user", "*")
|
||||
row := that.Db.Delete("user", Map{"id": id})
|
||||
that.Display(0, Slice{id, ok, ps, p, row})
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user