From e410f04aaf2db78083222488e35a0cff3b0ca2f1 Mon Sep 17 00:00:00 2001 From: faith Date: Wed, 13 Feb 2019 14:43:01 +0800 Subject: [PATCH] Update README.md (#1228) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sess 修改为 session --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a57606e..5c64e776 100644 --- a/README.md +++ b/README.md @@ -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/) \ No newline at end of file +BSD License [http://creativecommons.org/licenses/BSD/](http://creativecommons.org/licenses/BSD/)