docs fixed
This commit is contained in:
parent
98d4c0e000
commit
f8b456e670
|
@ -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()}
|
||||||
|
|
|
@ -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()}
|
||||||
|
|
Loading…
Reference in New Issue