Compare commits

..

103 Commits

Author SHA1 Message Date
940dcfb8c4 v2.0.0-alpha 2021-10-22 17:54:53 +08:00
8dd9483572 fix issue in unit testing case for package gview 2021-10-22 14:09:08 +08:00
4e7b33bde3 fix issue in unit testing case for package gview 2021-10-22 13:14:48 +08:00
977780736f improve gutil.Dump 2021-10-21 22:07:43 +08:00
aacfa1bd96 add short typed tag mapping for summary/description for package goai;add suffix checks for request/response struct naming 2021-10-21 20:17:02 +08:00
862ef57e0f fix unit testing cases 2021-10-21 19:25:39 +08:00
fa5499373a replace char <xxx> to ;add GetWithEnv/GetWithCmd fuctions for package gcfg 2021-10-21 18:22:47 +08:00
6bde7c61b4 openapi 2021-10-14 15:03:39 +08:00
085c887b33 openapi 2021-10-13 22:34:52 +08:00
920c97af79 openapi 2021-10-13 22:28:49 +08:00
f887c9f44b improve package gmeta 2021-10-12 17:52:31 +08:00
18ceebeffd filter key updates for stack information 2021-10-12 17:25:45 +08:00
854747574d fix issue in package gcfg 2021-10-12 16:15:52 +08:00
7eb3b32b26 fix unit testing cases 2021-10-11 21:53:16 +08:00
54dd11f511 README update 2021-10-11 21:43:27 +08:00
1bc0635f8b version 2 2021-10-11 21:41:56 +08:00
bea54b445e add context for validation functions of package gvalid 2021-10-11 21:34:19 +08:00
bc735fee51 openapi 2021-10-11 20:39:13 +08:00
82175b5de9 rename gctx.Value/WithValue to CtxId/WithCtxId 2021-10-11 20:25:02 +08:00
cefa3638cf openapi 2021-10-11 19:59:15 +08:00
cbfd92a21d add common request structure feature support for openapi 2021-10-11 17:10:55 +08:00
310e178206 add common response structure feature support for openapi 2021-10-11 16:55:38 +08:00
17904bccd0 openapi 2021-10-08 21:23:30 +08:00
5b2f40a454 openapi 2021-10-08 21:16:47 +08:00
b1113c328a openapi 2021-10-08 17:05:11 +08:00
26d823bd81 openapi 2021-10-08 16:32:40 +08:00
c225a15746 openapi 2021-10-08 16:02:53 +08:00
edd62f3b4f openapi 2021-10-08 15:37:17 +08:00
73e4a69383 openapi 2021-10-08 14:44:10 +08:00
5e32e8868e openapi 2021-10-08 11:42:28 +08:00
d430f2f52e openapi 2021-10-08 11:40:47 +08:00
51dbd133a4 openapi generating feature 2021-10-06 21:51:21 +08:00
4eb48660df openapi generating feature 2021-10-06 21:11:16 +08:00
d66d8585a2 openapi generating feature 2021-10-06 20:44:34 +08:00
89661301b0 fix issue for unit testing case for package ghttp 2021-10-06 20:16:18 +08:00
5d804987b9 add alias g.Meta for gmeta.Meta 2021-10-06 20:11:54 +08:00
892d3abf38 openapi generating feature 2021-10-06 19:52:19 +08:00
4a1a8c9fc5 openapi generating feature 2021-10-06 15:24:01 +08:00
18ede3ae1f improve error information for package goai 2021-10-06 15:03:00 +08:00
9ed79e9e86 openapi generating for ghttp.Server 2021-10-06 14:52:29 +08:00
5a7555a6ec fix issue in goai for recursive attribute 2021-10-06 14:45:29 +08:00
82d04d612b fix openapi specification generating; improve handler type 2021-10-06 14:22:58 +08:00
9f2eeb23ba print error stack in faltal error for ghttp.Server 2021-10-06 12:12:59 +08:00
c84e79a46d improve swagger ui feature for package ghttp 2021-10-06 11:54:53 +08:00
337c2d0953 filter issue in internal/structs 2021-10-06 11:10:35 +08:00
71189c8fb0 improve converting performance for equal type converting 2021-10-03 00:58:57 +08:00
322f5933ad add build-in swagger ui support for ghttp.Server 2021-10-03 00:22:06 +08:00
1e80dc71eb add automatic generating for OpenApi specification for ghttp.Server routes 2021-10-02 22:34:39 +08:00
198a6c8e33 add package goai for OpenAPIv3 support 2021-10-02 18:54:06 +08:00
0fdb935c3d add package goai for OpenAPIv3 support 2021-10-02 15:07:47 +08:00
dcafba8a2d add package goai for OpenAPIv3 support 2021-10-02 14:52:28 +08:00
131214151c add context for Client of package ghttp 2021-09-30 14:06:46 +08:00
dd4e08e88d refract package gdb; add selected & affected count to logging 2021-09-29 20:39:02 +08:00
b7b4067973 fix issue in unit testing case of package internal/structs 2021-09-29 19:18:27 +08:00
02478371f2 fix issue missing org tag value retrieving when using struct in Fields for package gdb 2021-09-28 22:02:08 +08:00
750972e7c6 fix unit testing cases 2021-09-28 19:04:36 +08:00
a9d7dc68a3 remove usage of package gparser 2021-09-27 23:05:46 +08:00
0a828aaed3 Merge branch 'v2_release' into develop 2021-09-27 22:52:28 +08:00
f2bab9777d comment update for package gvalid 2021-09-27 22:52:14 +08:00
993bf897cf remove deprecated functions; refract package gjson 2021-09-27 22:47:39 +08:00
df09d8c604 refract package ghttp/gredis/glog 2021-09-27 21:27:24 +08:00
5904a1e7c0 refract package gredis 2021-09-26 23:22:32 +08:00
6eee72b336 refract package gredis 2021-09-23 21:23:22 +08:00
a2c5c577db fix issue #1412 2021-09-23 19:29:20 +08:00
6fa0ad5793 gredis refract 2021-09-23 19:12:02 +08:00
c3b3258194 update dependencies clbanning/mxj,grokify/html-strip-tags-go,gopkg.in/yaml to stable version 2021-09-22 19:43:52 +08:00
ef0aeb363b comment update for paxkage gcache; improve package gbuild 2021-09-22 19:29:08 +08:00
c843661dfd Merge branch 'develop' of https://github.com/gogf/gf into develop 2021-09-22 19:12:44 +08:00
b2629b9bfa comment update for package gtrace 2021-09-22 19:12:31 +08:00
ad2b3e6cc6 Merge branch 'master' of https://github.com/houseme/gf into develop 2021-09-22 19:04:22 +08:00
cbe704333a [feature] upgrade opentelemetry version v1.0.0 map to string 2021-09-22 14:54:42 +08:00
45b45517c8 [feature] upgrade opentelemetry version v1.0.0 2021-09-21 23:53:03 +08:00
9d67cb4f34 [feature] upgrade opentelemetry version v1.0.0 2021-09-21 15:15:37 +08:00
fe2eccfda4 remove usage of package unsafe for package gtype/grand 2021-09-20 12:58:10 +08:00
81e54be0c1 readme update 2021-09-20 12:29:05 +08:00
2e49c33cc7 remove depecated functions from package ghttp 2021-09-19 23:13:53 +08:00
e01e8dd4a2 github ci action updates 2021-09-19 10:50:31 +08:00
a1297b0402 github ci action updates 2021-09-19 10:36:43 +08:00
53db88c630 comment update for package gsession 2021-09-19 10:18:58 +08:00
c99c13acd1 refract pacakge gcfg, adding adapter interface for pacakge gcfg 2021-09-19 10:01:09 +08:00
01a3dd1eb0 add function gerror.HasStack; rename all api* interfaces to i* 2021-09-17 19:26:56 +08:00
5383672d78 change returned parameter from interface{} to *gvar.Var for gsession.Sessio.Get; remove Get* function excluding Get for gsession.Session 2021-09-17 11:15:00 +08:00
28f70d52ee add context parameter for all functions of package gcache 2021-09-17 10:48:08 +08:00
1455e30350 change returned value by Get* and Update/Remove functions from type interface{} to *gvar.Var for package gcache 2021-09-16 22:13:00 +08:00
b46e9bb68a improve package gcache 2021-09-16 21:17:03 +08:00
55a9c0738b improve package gcache, add GetVar*/RemoveVar/UpdateVar functions for package gcache 2021-09-16 20:57:59 +08:00
101db282c2 fix issue #1401 2021-09-15 22:28:26 +08:00
ac78b2fa50 fix ci issue 2021-09-15 21:46:58 +08:00
e877eab033 fix ci issue 2021-09-15 21:21:29 +08:00
68e760d13a fix issue @1380 2021-09-15 21:17:45 +08:00
64a5cedcdf fix recover logic 2021-09-14 20:47:06 +08:00
40fedea408 Merge branch 'master' of https://github.com/gogf/gf 2021-09-14 20:25:33 +08:00
ffedfb7c0c improve package gproc for customize environment variables when creating process 2021-09-14 20:25:23 +08:00
cc08ceb797 improve package gring; remove function LockIteratorNext/LockIteratorPrev from package gring 2021-09-14 20:15:21 +08:00
053e4f2fc8 Merge pull request #1395 from houseme/master
[feature] upgrade opentelemetry v1.0.0-RC3
2021-09-14 20:15:01 +08:00
727f58a24b remove usage of gconv.Unsafe* functions internally to avoid unexpected errors 2021-09-14 19:30:20 +08:00
99b6085235 Merge branch 'master' of https://github.com/gogf/gf 2021-09-13 16:43:20 +08:00
006fb79967 improve package gjson; replace fmt.Errorf to gerror; improve examples for package gdb 2021-09-13 16:43:09 +08:00
0776c35ddb upgrade toml version 0.4.1 2021-09-08 05:43:04 +08:00
471a37ef00 upgrade toml version 0.4.1 2021-09-08 05:41:44 +08:00
1242733735 [feature] upgrade opentelemetry v1.0.0-RC3 2021-09-04 14:27:38 +08:00
077a41911b Merge pull request #1390 from houseme/master
fix #1389
2021-09-03 10:54:03 +08:00
adee4ac8dd fix #1389 2021-08-29 12:23:22 +08:00
1156 changed files with 15753 additions and 14351 deletions

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/v2/container/garray"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/v2/container/garray"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/v2/container/garray"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/v2/container/garray"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/garray"
"github.com/gogf/gf/v2/container/garray"
)
func main() {

View File

@ -2,7 +2,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/glist"
"github.com/gogf/gf/v2/container/glist"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/glist"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/container/glist"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/glist"
"github.com/gogf/gf/v2/container/glist"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/v2/container/gmap"
)
func main() {

View File

@ -3,9 +3,9 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/v2/container/gmap"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/v2/container/gmap"
)
func main() {

View File

@ -1,8 +1,8 @@
package main
import (
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/container/gmap"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -3,9 +3,9 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/container/gmap"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gutil"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/container/gmap"
"github.com/gogf/gf/v2/util/gutil"
)
func main() {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"time"
"github.com/gogf/gf/container/gpool"
"github.com/gogf/gf/v2/container/gpool"
)
func main() {

View File

@ -4,9 +4,9 @@ import (
"fmt"
"time"
"github.com/gogf/gf/container/gpool"
"github.com/gogf/gf/net/gtcp"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/v2/container/gpool"
"github.com/gogf/gf/v2/net/gtcp"
"github.com/gogf/gf/v2/os/glog"
)
func main() {

View File

@ -4,9 +4,9 @@ import (
"fmt"
"time"
"github.com/gogf/gf/container/gqueue"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/os/gtimer"
"github.com/gogf/gf/v2/container/gqueue"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/os/gtimer"
)
func main() {

View File

@ -4,8 +4,8 @@ import (
"fmt"
"time"
"github.com/gogf/gf/container/gqueue"
"github.com/gogf/gf/os/gtimer"
"github.com/gogf/gf/v2/container/gqueue"
"github.com/gogf/gf/v2/os/gtimer"
)
func main() {

View File

@ -4,9 +4,9 @@ import (
"fmt"
"time"
"github.com/gogf/gf/container/gqueue"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/os/gtimer"
"github.com/gogf/gf/v2/container/gqueue"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/os/gtimer"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gring"
"github.com/gogf/gf/v2/container/gring"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gring"
"github.com/gogf/gf/v2/container/gring"
)
type Player struct {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gset"
"github.com/gogf/gf/v2/container/gset"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gset"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/container/gset"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gset"
"github.com/gogf/gf/v2/container/gset"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gset"
"github.com/gogf/gf/v2/container/gset"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gtree"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/container/gtree"
"github.com/gogf/gf/v2/util/gutil"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gtree"
"github.com/gogf/gf/v2/container/gtree"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gtree"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/container/gtree"
"github.com/gogf/gf/v2/util/gutil"
)
func main() {

View File

@ -1,7 +1,7 @@
package main
import (
"github.com/gogf/gf/container/gtree"
"github.com/gogf/gf/v2/container/gtree"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/v2/container/gtype"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/v2/container/gtype"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gtype"
"github.com/gogf/gf/v2/container/gtype"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -3,8 +3,8 @@ package driver
import (
"context"
"database/sql"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/os/gtime"
)
// MyDriver is a custom database driver, which is used for testing only.

View File

@ -2,10 +2,10 @@ package main
import (
"fmt"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/v2/os/gtime"
_ "github.com/denisenkom/go-mssqldb"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -5,8 +5,8 @@ import (
"time"
//_ "github.com/denisenkom/go-mssqldb"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
// 本文件用于gf框架的mssql数据库操作示例不作为单元测试使用

View File

@ -4,7 +4,7 @@
[database.logger]
Level = "all"
Stdout = true
CtxKeys = ["Trace-Id"]
CtxKeys = ["RequestId"]
[database.default]
link = "mysql:root:12345678@tcp(127.0.0.1:3306)/test"
debug = true

View File

@ -1,7 +1,8 @@
package main
import (
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/os/gctx"
"sync"
"time"
)
@ -24,13 +25,16 @@ func init() {
}
func main() {
wg := sync.WaitGroup{}
var (
wg = sync.WaitGroup{}
ctx = gctx.New()
)
for i := 0; i < 100000; i++ {
wg.Add(1)
go func() {
defer wg.Done()
time.Sleep(10 * time.Second)
db.Table("user").Where("id=1").All()
db.Ctx(ctx).Model("user").Where("id=1").All()
}()
}
wg.Wait()

View File

@ -2,27 +2,23 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
func main() {
db := g.DB()
var (
db = g.DB()
ctx = gctx.New()
)
// 开启调试模式以便于记录所有执行的SQL
db.SetDebug(true)
r, e := db.GetAll("SELECT * from `user` where id in(?)", g.Slice{})
r, e := db.Ctx(ctx).GetAll("SELECT * from `user` where id in(?)", g.Slice{})
if e != nil {
fmt.Println(e)
}
if r != nil {
fmt.Println(r)
}
return
//r, e := db.Table("user").Where("id in(?)", g.Slice{}).All()
//if e != nil {
// fmt.Println(e)
//}
//if r != nil {
// fmt.Println(r.List())
//}
}

View File

@ -1,13 +1,19 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
func main() {
db := g.DB()
var (
db = g.DB()
ctx = gctx.New()
)
db.Table("user").Where("nickname like ? and passport like ?", g.Slice{"T3", "t3"}).OrderBy("id asc").All()
db.Ctx(ctx).Model("user").
Where("nickname like ? and passport like ?", g.Slice{"T3", "t3"}).
OrderAsc("id").All()
conditions := g.Map{
"nickname like ?": "%T%",
@ -16,8 +22,8 @@ func main() {
"create_time > ?": 0,
"id in(?)": g.Slice{1, 2, 3},
}
db.Table("user").Where(conditions).OrderBy("id asc").All()
db.Ctx(ctx).Model("user").Where(conditions).OrderAsc("id").All()
var params []interface{}
db.Table("user").Where("1=1", params).OrderBy("id asc").All()
db.Ctx(ctx).Model("user").Where("1=1", params).OrderAsc("id").All()
}

View File

@ -2,11 +2,15 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
func main() {
db := g.DB()
var (
db = g.DB()
ctx = gctx.New()
)
db.SetDebug(true)
list := make(g.List, 0)
for i := 0; i < 100; i++ {
@ -14,7 +18,7 @@ func main() {
"name": fmt.Sprintf(`name_%d`, i),
})
}
r, e := db.Table("user").Data(list).Batch(2).Insert()
r, e := db.Ctx(ctx).Model("user").Data(list).Batch(2).Insert()
if e != nil {
panic(e)
}

View File

@ -2,10 +2,11 @@ package main
import (
"fmt"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/crypto/gaes"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/crypto/gaes"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
@ -19,6 +20,9 @@ func main() {
Role: "master",
Charset: "utf8",
})
var (
ctx = gctx.New()
)
db, err := gdb.New()
if err != nil {
panic(err)
@ -33,7 +37,7 @@ func main() {
}
// 写入
r, err := db.Table("user").Data(g.Map{
r, err := db.Ctx(ctx).Model("user").Data(g.Map{
"uid": 1,
"name": encryptedName,
}).Save()
@ -43,9 +47,9 @@ func main() {
fmt.Println(r.RowsAffected())
// 查询
one, err := db.Table("user").Where("name=?", encryptedName).One()
one, err := db.Ctx(ctx).Model("user").Where("name=?", encryptedName).One()
if err != nil {
fmt.Println(err)
}
fmt.Println(one.ToMap())
fmt.Println(one.Map())
}

View File

@ -2,19 +2,23 @@ package main
import (
"fmt"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
db := g.DB()
var (
db = g.DB()
ctx = gctx.New()
)
db.SetDebug(true)
r, e := db.Table("test").All()
r, e := db.Ctx(ctx).Model("test").All()
if e != nil {
panic(e)
}
if r != nil {
fmt.Println(r.ToList())
fmt.Println(r.List())
}
}

View File

@ -1,8 +1,9 @@
package main
import (
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/util/gutil"
"time"
)
@ -17,6 +18,9 @@ func main() {
Role: "master",
Charset: "utf8",
})
var (
ctx = gctx.New()
)
db, err := gdb.New()
if err != nil {
panic(err)
@ -27,7 +31,7 @@ func main() {
// 执行2次查询并将查询结果缓存3秒并可执行缓存名称(可选)
for i := 0; i < 3; i++ {
r, _ := db.Table("user").Cache(3000*time.Second).Where("id=?", 1).One()
r, _ := db.Ctx(ctx).Model("user").Cache(3000*time.Second).Where("id=?", 1).One()
gutil.Dump(r.Map())
}

View File

@ -1,12 +1,12 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
// error!
r, err := g.DB().Table("user").Where(g.Map{
r, err := g.DB().Model("user").Where(g.Map{
"or": g.Map{
"nickname": "jim",
"create_time > ": "2019-10-01",

View File

@ -3,11 +3,11 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
if r, err := g.DB().Table("user").Where("uid=?", 1).One(); err == nil {
if r, err := g.DB().Model("user").Where("uid=?", 1).One(); err == nil {
fmt.Println(r["uid"].Int())
fmt.Println(r["name"].String())
} else {

View File

@ -3,12 +3,12 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
g.Config().SetFileName("config2.toml")
if r, err := g.DB().Table("user").Where("uid=?", 1).One(); err == nil {
if r, err := g.DB().Model("user").Where("uid=?", 1).One(); err == nil {
fmt.Println(r["uid"].Int())
fmt.Println(r["name"].String())
} else {

View File

@ -3,19 +3,19 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
g.Config().SetFileName("config3.toml")
if r, err := g.DB().Table("user").Where("uid=?", 1).One(); err == nil {
if r, err := g.DB().Model("user").Where("uid=?", 1).One(); err == nil {
fmt.Println(r["uid"].Int())
fmt.Println(r["name"].String())
} else {
fmt.Println(err)
}
if r, err := g.DB("user").Table("user").Where("uid=?", 1).One(); err == nil {
if r, err := g.DB("user").Model("user").Where("uid=?", 1).One(); err == nil {
fmt.Println(r["uid"].Int())
fmt.Println(r["name"].String())
} else {

View File

@ -2,11 +2,11 @@ package main
import (
"context"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
ctx := context.WithValue(context.Background(), "Trace-Id", "123456789")
ctx := context.WithValue(context.Background(), "RequestId", "123456789")
_, err := g.DB().Ctx(ctx).Query("SELECT 1")
if err != nil {
panic(err)

View File

@ -2,11 +2,11 @@ package main
import (
"context"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
ctx := context.WithValue(context.Background(), "Trace-Id", "123456789")
ctx := context.WithValue(context.Background(), "RequestId", "123456789")
_, err := g.DB().Model("user").Ctx(ctx).All()
if err != nil {
panic(err)

View File

@ -2,23 +2,20 @@ package main
import (
"fmt"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
func main() {
db := g.Database()
var (
db = g.DB()
ctx = gctx.New()
)
db.SetDebug(true)
//r, err := db.Table("user").Data("create_time", gtime.Now().String()).Insert()
//if err == nil {
// fmt.Println(r.LastInsertId())
//} else {
// panic(err)
//}
r, err := db.Table("user").Data(g.Map{
r, err := db.Ctx(ctx).Model("user").Data(g.Map{
"name": "john",
"create_time": gtime.Now().String(),
}).Insert()

View File

@ -1,9 +1,10 @@
package main
import (
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/glog"
)
func main() {
@ -17,6 +18,9 @@ func main() {
Role: "master",
Charset: "utf8",
})
var (
ctx = gctx.New()
)
db, err := gdb.New()
if err != nil {
panic(err)
@ -27,11 +31,11 @@ func main() {
// 执行3条SQL查询
for i := 1; i <= 3; i++ {
db.Table("user").Where("uid=?", i).One()
db.Ctx(ctx).Model("user").Where("uid=?", i).One()
}
// 构造一条错误查询
db.Table("user").Where("no_such_field=?", "just_test").One()
db.Model("user").Where("no_such_field=?", "just_test").One()
db.Table("user").Data(g.Map{"name": "smith"}).Where("uid=?", 1).Save()
db.Ctx(ctx).Model("user").Data(g.Map{"name": "smith"}).Where("uid=?", 1).Save()
}

View File

@ -1,18 +1,22 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
func main() {
db := g.DB()
var (
db = g.DB()
ctx = gctx.New()
)
// 执行3条SQL查询
for i := 1; i <= 3; i++ {
db.Table("user").Where("id=?", i).One()
db.Ctx(ctx).Model("user").Where("id=?", i).One()
}
// 构造一条错误查询
db.Table("user").Where("no_such_field=?", "just_test").One()
db.Ctx(ctx).Model("user").Where("no_such_field=?", "just_test").One()
db.Table("user").Data(g.Map{"name": "smith"}).Where("uid=?", 1).Save()
db.Ctx(ctx).Model("user").Data(g.Map{"name": "smith"}).Where("uid=?", 1).Save()
}

View File

@ -1,7 +1,7 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -2,8 +2,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
@ -18,7 +18,7 @@ func main() {
db.SetDebug(true)
r, e := db.Table("user").Data(g.Map{
r, e := db.Model("user").Data(g.Map{
"create_at": "now()",
}).Unscoped().Insert()
if e != nil {

View File

@ -3,12 +3,12 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
var (
tableName = "orders"
dao = g.DB().Table(tableName).Safe()
dao = g.DB().Model(tableName).Safe()
)
type OrderServiceEntity struct {

View File

@ -2,10 +2,11 @@ package main
import (
"fmt"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/encoding/gparser"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
@ -19,19 +20,22 @@ func main() {
Role: "master",
Charset: "utf8",
})
db := g.DB()
one, err := db.Table("user").Where("id=?", 1).One()
var (
db = g.DB()
ctx = gctx.New()
)
one, err := db.Ctx(ctx).Model("user").Where("id=?", 1).One()
if err != nil {
panic(err)
}
// 使用内置方法转换为json/xml
fmt.Println(one.ToJson())
fmt.Println(one.ToXml())
fmt.Println(one.Json())
fmt.Println(one.Xml())
// 自定义方法方法转换为json/xml
jsonContent, _ := gparser.VarToJson(one.ToMap())
jsonContent, _ := gjson.New(one.Map()).ToJson()
fmt.Println(string(jsonContent))
xmlContent, _ := gparser.VarToXml(one.ToMap())
xmlContent, _ := gjson.New(one.Map()).ToJson()
fmt.Println(string(xmlContent))
}

View File

@ -1,20 +1,24 @@
package main
import (
"github.com/gogf/gf/v2/os/gctx"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
db := g.DB()
var (
db = g.DB()
ctx = gctx.New()
)
// 开启调试模式以便于记录所有执行的SQL
db.SetDebug(true)
for {
for i := 0; i < 10; i++ {
go db.Table("user").All()
go db.Ctx(ctx).Model("user").All()
}
time.Sleep(time.Millisecond * 100)
}

View File

@ -2,15 +2,19 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"time"
)
func main() {
db := g.DB()
var (
db = g.DB()
ctx = gctx.New()
)
db.SetDebug(true)
for {
r, err := db.Table("user").All()
r, err := db.Ctx(ctx).Model("user").All()
fmt.Println(err)
fmt.Println(r)
time.Sleep(time.Second * 10)

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
@ -17,7 +17,7 @@ func main() {
}
user := (*User)(nil)
fmt.Println(user)
err := db.Table("test").Where("id=1").Struct(&user)
err := db.Model("test").Where("id=1").Scan(&user)
fmt.Println(err)
fmt.Println(user)
}

View File

@ -1,14 +1,18 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
func main() {
db := g.DB()
var (
db = g.DB()
ctx = gctx.New()
)
db.SetDebug(true)
tables, err := db.Tables()
tables, err := db.Tables(ctx)
if err != nil {
panic(err)
}

View File

@ -1,21 +1,25 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
func main() {
db := g.DB()
var (
db = g.DB()
ctx = gctx.New()
)
db.SetDebug(true)
tables, e := db.Tables()
tables, e := db.Tables(ctx)
if e != nil {
panic(e)
}
if tables != nil {
g.Dump(tables)
for _, table := range tables {
fields, err := db.TableFields(table)
fields, err := db.TableFields(ctx, table)
if err != nil {
panic(err)
}

View File

@ -1,7 +1,7 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -1,26 +1,29 @@
package main
import (
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
"context"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
func main() {
var (
err error
db = g.DB()
ctx = gctx.New()
table = "user"
)
if err = db.Transaction(func(tx *gdb.TX) error {
if err = db.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
// Nested transaction 1.
if err = tx.Transaction(func(tx *gdb.TX) error {
if err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
_, err = tx.Model(table).Data(g.Map{"id": 1, "name": "john"}).Insert()
return err
}); err != nil {
return err
}
// Nested transaction 2, panic.
if err = tx.Transaction(func(tx *gdb.TX) error {
if err = tx.Transaction(ctx, func(ctx context.Context, tx *gdb.TX) error {
_, err = tx.Model(table).Data(g.Map{"id": 2, "name": "smith"}).Insert()
// Create a panic that can make this transaction rollback automatically.
panic("error")

View File

@ -1,7 +1,7 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -3,16 +3,16 @@ package main
import (
"database/sql"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
db := g.DB()
table := "medicine_clinics_upload_yinchuan"
list, err := db.Table(table).All()
list, err := db.Model(table).All()
if err != nil && err != sql.ErrNoRows {
panic(err)
}

View File

@ -3,13 +3,13 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
db := g.DB()
db.SetDebug(true)
result, err := db.Table("pw_passageway m,pw_template t").Data("t.status", 99).Where("m.templateId=t.id AND m.status = 0").Update()
result, err := db.Model("pw_passageway m,pw_template t").Data("t.status", 99).Where("m.templateId=t.id AND m.status = 0").Update()
if err != nil {
panic(err)
}

View File

@ -2,11 +2,11 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
one, err := g.DB().Table("carlist c").
one, err := g.Model("carlist c").
LeftJoin("cardetail d", "c.postid=d.carid").
Where("c.postid", "142039140032006").
Fields("c.*,d.*").One()

View File

@ -1,10 +1,12 @@
package main
import (
"context"
"fmt"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gmeta"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/util/gmeta"
)
func main() {
@ -30,13 +32,13 @@ func main() {
}
db := g.DB()
db.Transaction(func(tx *gdb.TX) error {
err := db.Transaction(gctx.New(), func(ctx context.Context, tx *gdb.TX) error {
for i := 1; i <= 5; i++ {
// User.
user := User{
Name: fmt.Sprintf(`name_%d`, i),
}
lastInsertId, err := db.Model(user).Data(user).OmitEmpty().InsertAndGetId()
lastInsertId, err := db.Ctx(ctx).Model(user).Data(user).OmitEmpty().InsertAndGetId()
if err != nil {
return err
}
@ -45,7 +47,7 @@ func main() {
Uid: int(lastInsertId),
Address: fmt.Sprintf(`address_%d`, lastInsertId),
}
_, err = db.Model(userDetail).Data(userDetail).OmitEmpty().Insert()
_, err = db.Ctx(ctx).Model(userDetail).Data(userDetail).OmitEmpty().Insert()
if err != nil {
return err
}
@ -55,7 +57,7 @@ func main() {
Uid: int(lastInsertId),
Score: j,
}
_, err = db.Model(userScore).Data(userScore).OmitEmpty().Insert()
_, err = db.Ctx(ctx).Model(userScore).Data(userScore).OmitEmpty().Insert()
if err != nil {
return err
}
@ -63,4 +65,5 @@ func main() {
}
return nil
})
fmt.Println(err)
}

View File

@ -1,8 +1,8 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gmeta"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gmeta"
)
func main() {

View File

@ -1,7 +1,7 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
"time"
)
@ -9,7 +9,7 @@ func test1() {
db := g.DB()
db.SetDebug(true)
time.Sleep(1 * time.Minute)
r, e := db.Table("test").Where("id", 10000).Count()
r, e := db.Model("test").Where("id", 10000).Count()
if e != nil {
panic(e)
}
@ -19,7 +19,7 @@ func test1() {
func test2() {
db := g.DB()
db.SetDebug(true)
dao := db.Table("test").Safe()
dao := db.Model("test").Safe()
time.Sleep(1 * time.Minute)
r, e := dao.Where("id", 10000).Count()
if e != nil {

View File

@ -5,8 +5,8 @@ import (
"time"
//_ "github.com/mattn/go-oci8"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
// 本文件用于gf框架的mysql数据库操作示例不作为单元测试使用

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
_ "github.com/mattn/go-sqlite3"
)

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/database/gredis"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/database/gredis"
"github.com/gogf/gf/v2/util/gconv"
)
// 使用原生gredis.New操作redis但是注意需要自己调用Close方法关闭redis链接池

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
)
// 使用框架封装的g.Redis()方法获得redis操作对象单例不需要开发者显示调用Close方法

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -2,7 +2,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/v2/debug/gdebug"
)
func main() {

View File

@ -2,7 +2,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/v2/debug/gdebug"
)
func main() {

View File

@ -3,7 +3,7 @@ package gbase64
import (
"fmt"
"github.com/gogf/gf/encoding/gbase64"
"github.com/gogf/gf/v2/encoding/gbase64"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/encoding/gbinary"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/v2/encoding/gbinary"
"github.com/gogf/gf/v2/os/glog"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/encoding/gbinary"
"github.com/gogf/gf/v2/encoding/gbinary"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/encoding/gbinary"
"github.com/gogf/gf/v2/encoding/gbinary"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/encoding/gcharset"
"github.com/gogf/gf/v2/encoding/gcharset"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/encoding/gcompress"
"github.com/gogf/gf/v2/encoding/gcompress"
)
func main() {

View File

@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/gogf/gf/encoding/gcompress"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/v2/encoding/gcompress"
"github.com/gogf/gf/v2/os/gfile"
)
func main() {

View File

@ -3,7 +3,7 @@ package main
import (
"archive/zip"
"fmt"
"github.com/gogf/gf/encoding/gcompress"
"github.com/gogf/gf/v2/encoding/gcompress"
"io"
"os"
"path/filepath"

View File

@ -4,7 +4,7 @@ import (
"fmt"
"strconv"
"github.com/gogf/gf/encoding/ghash"
"github.com/gogf/gf/v2/encoding/ghash"
)
func main() {

View File

@ -2,7 +2,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/encoding/gini"
"github.com/gogf/gf/v2/encoding/gini"
)
func main() {

View File

@ -3,9 +3,9 @@ package main
import (
"fmt"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/os/glog"
"github.com/gogf/gf/v2/os/gtime"
)
func getByPattern() {

View File

@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/v2/encoding/gjson"
)
type XinYanModel struct {

View File

@ -1,9 +1,9 @@
package main
import (
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/glog"
)
type GameUser struct {

View File

@ -2,7 +2,7 @@ package main
import (
"fmt"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/v2/encoding/gjson"
)
func main() {

Some files were not shown because too many files have changed in this diff Show More