Update README.md (#1228)

sess 修改为 session
This commit is contained in:
faith 2019-02-13 14:43:01 +08:00 committed by Lunny Xiao
parent ee64beb73b
commit e410f04aaf
1 changed files with 2 additions and 2 deletions

View File

@ -363,7 +363,7 @@ return session.Commit()
* Or you can use `Transaction` to replace above codes.
```Go
res, err := engine.Transaction(func(sess *xorm.Session) (interface{}, error) {
res, err := engine.Transaction(func(session *xorm.Session) (interface{}, error) {
user1 := Userinfo{Username: "xiaoxiao", Departname: "dev", Alias: "lunny", Created: time.Now()}
if _, err := session.Insert(&user1); err != nil {
return nil, err
@ -493,4 +493,4 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
## LICENSE
BSD License [http://creativecommons.org/licenses/BSD/](http://creativecommons.org/licenses/BSD/)
BSD License [http://creativecommons.org/licenses/BSD/](http://creativecommons.org/licenses/BSD/)