docs fixed

This commit is contained in:
Lunny Xiao 2013-12-12 15:42:44 +08:00
parent 98d4c0e000
commit f8b456e670
2 changed files with 3 additions and 0 deletions

View File

@ -579,6 +579,7 @@ res, err := engine.Exec(sql, "xiaolun", 1)
```Go ```Go
session := engine.NewSession() session := engine.NewSession()
defer session.Close()
// add Begin() before any action // add Begin() before any action
err := session.Begin() err := session.Begin()
user1 := Userinfo{Username: "xiaoxiao", Departname: "dev", Alias: "lunny", Created: time.Now()} user1 := Userinfo{Username: "xiaoxiao", Departname: "dev", Alias: "lunny", Created: time.Now()}

View File

@ -569,6 +569,8 @@ res, err := engine.Exec(sql, "xiaolun", 1)
```Go ```Go
session := engine.NewSession() session := engine.NewSession()
defer session.Close()
// add Begin() before any action // add Begin() before any action
err := session.Begin() err := session.Begin()
user1 := Userinfo{Username: "xiaoxiao", Departname: "dev", Alias: "lunny", Created: time.Now()} user1 := Userinfo{Username: "xiaoxiao", Departname: "dev", Alias: "lunny", Created: time.Now()}