Compare commits

...

2384 Commits

Author SHA1 Message Date
2eec1bc61a version updates 2022-03-14 19:39:56 +08:00
09a3f23e3d cli pack updates 2022-03-13 09:23:19 +08:00
329f6b90f7 improve gutil.Dump feature 2022-03-11 15:26:01 +08:00
9e056dfac8 Merge branch 'master' of https://github.com/gogf/gf 2022-03-11 10:24:57 +08:00
d8d9996464 fix issue #1662 2022-03-11 10:24:42 +08:00
43992a137e Merge pull request #1659 from arieslee/master
[fix bug] the default value of r.get is invalid
2022-03-11 09:14:11 +08:00
7767bf4d5d 重跑ci 2022-03-11 07:54:34 +08:00
acd1989fa1 improve Dump feature for package gutil 2022-03-10 22:29:47 +08:00
afa1f78a02 fix issue #1661 2022-03-10 21:12:24 +08:00
87b1433473 issue template update 2022-03-10 19:30:03 +08:00
5813979479 重跑ci 2022-03-10 14:32:06 +08:00
ba7cbfe3d9 error message update for database driver import 2022-03-10 14:29:49 +08:00
546b6b1724 t.Assert(err, nil) -> t.AssertNil(err) 2022-03-10 11:36:40 +08:00
eca3583845 fix issue #1416; add ParseOption for package gview 2022-03-10 11:35:23 +08:00
2471130f59 重跑ci 2022-03-10 09:52:45 +08:00
f5693c4393 improve package gview 2022-03-10 09:48:19 +08:00
12eb3ac63e [fix bug] the default value of r.get is invalid 2022-03-10 09:33:33 +08:00
e3f0163092 Merge branch 'master' of https://github.com/gogf/gf 2022-03-10 09:23:01 +08:00
213392640c fix issue #1653 2022-03-10 09:22:50 +08:00
4382a6e7bc Merge pull request #1658 from houseme/fix-1655
fix: js link err
2022-03-10 09:14:38 +08:00
c200177af4 fix: js link err 2022-03-09 23:36:30 +08:00
465100ae41 Merge pull request #1657 from houseme/fix-1655
fix: server access logs contain the protocol used between the server …
2022-03-09 22:23:40 +08:00
3d6867c321 fix 2022-03-09 21:29:49 +08:00
3d5ff3b250 fix 2022-03-09 21:27:02 +08:00
be47203732 improve code 2022-03-09 21:24:57 +08:00
1625fc6f7e improve order feature for gdb.Model 2022-03-09 21:02:08 +08:00
fa57634505 Merge pull request #1529 from zxr615/feature-groupRaw
Added Order() method support for gdb.
2022-03-09 20:55:15 +08:00
ac71658b4b Merge branch 'master' into feature-groupRaw 2022-03-09 20:55:06 +08:00
61db7d96b7 Merge pull request #1520 from FlyingBlazer/patch-1
Fix gdb Order
2022-03-09 20:48:54 +08:00
5ee297d999 Merge pull request #1651 from chenzebinm4/develop/bert
Repeat 'len(s)'.
2022-03-09 20:46:41 +08:00
6301403777 Merge pull request #1632 from huangqian1985/master
Improving gfile and gSesssion Code Coverage
2022-03-09 20:45:44 +08:00
95881d7616 Merge pull request #1652 from stardemo/master
[fix] gf cli build missing suffix
2022-03-09 20:43:40 +08:00
85d8f90d81 Merge pull request #1656 from tiger1103/master
[fix bug] Fix redis cache adapter GetOrSetFunc, GetOrSetFuncLock meth…
2022-03-09 20:42:44 +08:00
f6054ab37f improve code 2022-03-09 18:32:13 +08:00
5537930210 fix 2022-03-09 18:30:32 +08:00
920dbbef5e fix: server access logs contain the protocol used between the server and the load balancer, but not the protocol used between the client and the load balancer 2022-03-09 17:42:56 +08:00
yxh
2510e0412d [fix bug] Fix redis cache adapter GetOrSetFunc, GetOrSetFuncLock method bug and add unit test 2022-03-09 17:21:02 +08:00
2302f88847 [fix] gf cli build missing suffix 2022-03-09 11:27:52 +08:00
4f95d0a07a Repeat 'len(s)'. 2022-03-09 10:53:28 +08:00
8f326dcac5 project template update 2022-03-08 22:51:56 +08:00
aa294ea5df ci updates 2022-03-08 21:27:14 +08:00
6afc725b61 ci updates 2022-03-08 21:22:01 +08:00
ec01693773 ci updates 2022-03-08 21:04:48 +08:00
b0cf501782 ci updates 2022-03-08 20:28:18 +08:00
c2fb7ada0a improve example for package gmap 2022-03-08 20:25:34 +08:00
d0a8e60ace improve example for package gmap 2022-03-08 20:14:38 +08:00
ab36bb8842 version updates 2022-03-08 20:12:48 +08:00
0b3cd7b7ae improve handler response for ghttp.Server 2022-03-08 11:50:23 +08:00
10ed04cdb8 example updates for package gmap 2022-03-08 09:49:33 +08:00
f08c18594b Merge branch 'master' of https://github.com/gogf/gf 2022-03-07 22:35:39 +08:00
e09704a408 example updates for package gmap 2022-03-07 22:10:34 +08:00
ade9ae3c0b improve package goai 2022-03-07 21:29:37 +08:00
9cf6124c4c improve package goai 2022-03-07 21:09:02 +08:00
6d323cc529 improve package goai 2022-03-07 20:49:30 +08:00
aea9f6fe18 keep sequence in attributes definition for oai.Schemas 2022-03-07 19:46:05 +08:00
8a27463e44 ensure sequence for json.Marshal for gmap.ListMap/TreeMap 2022-03-07 17:39:41 +08:00
47ee2cba51 Merge branch 'master' of https://github.com/gogf/gf 2022-03-07 09:58:07 +08:00
531cc7b864 fix issue in package gproc 2022-03-07 09:57:51 +08:00
54bdabd94d Merge pull request #1549 from FlyingBlazer/cookie-secure-config
ghttp: add cookie security configurations
2022-03-04 17:42:44 +08:00
bb6e8fe7a8 Merge branch 'master' of https://github.com/gogf/gf 2022-03-04 11:37:30 +08:00
d5d199ebef Swagger UI updates 2022-03-04 11:36:05 +08:00
158a4589d2 Merge pull request #1637 from wangbs95/feature/fix-chinese-encode
fix(fix bug , add nexttime feature): ServeFileDownload filename doubl…
2022-03-04 09:32:01 +08:00
84c0f456c0 template pack update 2022-03-03 21:43:01 +08:00
3fcd6ef877 fix issue orphan value parsing for sructured arguments of command for package gcmd 2022-03-03 21:03:42 +08:00
b5855037f3 Improving gSession Code Coverage 2022-03-02 21:50:23 +08:00
4e2d378145 improve file uploading using strict route feature 2022-03-02 21:15:16 +08:00
38a7055017 Merge branch 'master' of https://github.com/gogf/gf 2022-03-02 21:05:14 +08:00
d64898c59a improve package goai 2022-03-02 20:00:40 +08:00
3bff71b3fc merge master and update unit test 2022-03-02 15:33:58 +08:00
8343d1cd0e Merge branch 'master' into cookie-secure-config 2022-03-02 15:20:31 +08:00
5c23c0cecd fix(fix bug , add nexttime feature): ServeFileDownload filename double quotes cause underscores before and after the final file 2022-03-02 11:00:04 +08:00
f580713478 Merge branch 'master' of https://github.com/gogf/gf 2022-03-02 10:26:20 +08:00
3c58b8d7fa improve openapi 2022-03-02 10:26:09 +08:00
072d5f9760 make options public 2022-03-02 09:56:58 +08:00
f8067f5dd5 improve package ghttp 2022-03-01 22:53:19 +08:00
ea354d10cc Merge pull request #1636 from wangbs95/feature/fix-chinese-encode
revert(fix bug , add nexttime feature): ServeFileDownload File name C…
2022-03-01 22:52:34 +08:00
4d5b41434a Merge branch 'master' of https://github.com/gogf/gf 2022-03-01 22:38:51 +08:00
1724a26957 improve package gcfg 2022-03-01 22:34:57 +08:00
cb69fbcbd6 Improving gSession Code Coverage 2022-03-01 22:12:59 +08:00
46dc68dfd5 CI update for gf cli 2022-03-01 21:20:17 +08:00
12fdfbf8b2 improve package gcfg 2022-03-01 21:14:45 +08:00
992a986d12 Merge branch 'master' of https://github.com/gogf/gf 2022-03-01 20:02:21 +08:00
68bdf7deb4 revert(fix bug , add nexttime feature): ServeFileDownload File name Chinese garbled repair 2022-03-01 18:32:11 +08:00
2362c453ec improve cli command install 2022-03-01 16:39:47 +08:00
50f6b6e0f0 fix UT case for package ghttp 2022-03-01 14:08:36 +08:00
88a9eef8a6 api swagger ui update 2022-03-01 11:43:42 +08:00
eb533f3344 Improving gfile Code Coverage 2022-02-28 22:57:53 +08:00
308e13a546 gf cli command build update 2022-02-28 22:00:25 +08:00
a0b1fefdbb Merge branch 'master' of https://github.com/gogf/gf 2022-02-28 21:58:15 +08:00
3edbcb7bf9 gf cli update 2022-02-28 21:57:59 +08:00
436931b560 Merge branch 'master' of https://github.com/gogf/gf 2022-02-28 21:15:15 +08:00
0516159ae3 Improving gcmd Code Coverage 2022-02-28 21:11:53 +08:00
cb78953b38 Merge pull request #1628 from huangqian1985/master
Improving gcmd Code Coverage
2022-02-28 20:45:01 +08:00
a1ddac4e6b Merge branch 'master' of https://github.com/gogf/gf 2022-02-28 17:49:16 +08:00
456697ea99 improve cli command install 2022-02-28 17:48:52 +08:00
8acffd1186 Improving gcmd Code Coverage 2022-02-27 21:00:23 +08:00
814450fd17 gcmd example 2022-02-27 13:22:26 +08:00
1365c1d277 Merge pull request #1623 from huangqian1985/master
Improving gjson Code Coverage
2022-02-27 08:59:19 +08:00
30be5c5e49 Improving gjson Code Coverage And Fix 2022-02-26 21:26:30 +08:00
932cd9d5bb README updates 2022-02-25 10:22:54 +08:00
7b5f17c16b gf cli pack template update 2022-02-24 22:44:48 +08:00
b5e8e68713 fix issue #1625 2022-02-24 22:07:27 +08:00
3a803ac39f fix 2022-02-24 21:41:39 +08:00
d27db119a0 fix issue #1626 2022-02-24 21:24:42 +08:00
f54d0a339c Improving gjson Code Coverage 2022-02-24 21:14:11 +08:00
d83b676c60 Merge branch 'gjson_example' 2022-02-24 20:15:55 +08:00
def3dc364f Merge branch 'master' of https://github.com/gogf/gf 2022-02-24 20:15:44 +08:00
298aa5f040 Improving gjson Code Coverage 2022-02-24 20:14:44 +08:00
e4d56e7ad9 improve package gjson 2022-02-23 16:54:15 +08:00
8eb9fdfcd0 improve package gbuild; version updates 2022-02-23 12:03:21 +08:00
3db5358dcc fix issue #1615 2022-02-23 10:34:38 +08:00
d1fe0670fc Merge branch 'master' of https://github.com/gogf/gf 2022-02-23 10:27:44 +08:00
ee614f9c6b fix issue #1563 2022-02-23 10:27:31 +08:00
0fce4edcd3 Merge branch 'master' of https://github.com/gogf/gf 2022-02-23 00:46:47 +08:00
a34f52ae5e Merge branch 'gjson_example' 2022-02-23 00:46:33 +08:00
da465bb030 Improving gjson Code Coverage 2022-02-23 00:46:13 +08:00
d23b24dfba Merge pull request #1610 from huangqian1985/master
gjson Example Function
2022-02-22 22:03:54 +08:00
22941276a5 fix issue #1611 2022-02-22 21:59:18 +08:00
20a50cb198 fix issue #1615 2022-02-22 21:32:48 +08:00
f0cd3c084e fix data race in UT cases for package ghttp 2022-02-22 20:49:09 +08:00
d9c1e1f576 improve package gconv/cli 2022-02-22 20:19:41 +08:00
aa6705f493 improva gf cli, package gcfg 2022-02-22 17:42:40 +08:00
3f526c3819 command usage description update for package gf cli 2022-02-22 14:17:18 +08:00
6f5058c9b6 add x-url-path feature for ghttp.Server 2022-02-22 14:12:09 +08:00
4935416b94 add middleware for CORS with default options 2022-02-22 10:51:22 +08:00
afa58ed45b fix issue #1227 #1617 2022-02-22 10:43:31 +08:00
42bccb4c23 Merge branch 'master' of https://github.com/gogf/gf 2022-02-19 19:49:36 +08:00
b2b0a1828e Implemented gjson Example
1.MapStrAny 2.Interfaces 3.Interface 4.Var 5.IsNil 6.Get 7.GetJson 8.GetJsons 9.GetJsonMap 10.Set 11.MustSet 12.Remove 13.MustRemove 14.Contains 15.Len 16.Append 17.MustAppend 18. Map 19.Array 20.Scan 21.Dump
2022-02-19 19:48:50 +08:00
5eec9ce7b1 Modify Function Name 2022-02-19 11:43:45 +08:00
7812f41b43 fix issue #1219 2022-02-17 23:04:50 +08:00
0bd3537a78 Implemented gjson Example
1.SetViolenceCheck 2.ToJson 3.ToJsonString 4.ToJsonIndent 5.ToJsonIndentString 6.MustToJson 7.MustToJsonString 8.MustToJsonIndent 9.MustToJsonIndentString 10.ToXml 11.ToXmlString 12.ToXmlIndent 13.ToXmlIndentString 14.MustToXml 15.MustToXmlString 16.MustToXmlIndent 17.MustToXmlIndentString 18.ToYaml 19.ToYamlString 20.ToYamlIndent 21.MustToYaml 22.MustToYamlString 23.ToToml 24.ToTomlString 25.MustToToml 26.MustToTomlString 27.ToIni 28.ToIniString 29.MustToIni 30.MustToIniString 31.MarshalJSON 32.UnmarshalJSON 33.UnmarshalValue
2022-02-17 22:54:29 +08:00
fdf09b5978 improve UT case for package gtimer 2022-02-17 22:45:06 +08:00
17d7c92b9d fix issue #1217 2022-02-17 22:42:33 +08:00
b6a7788240 fix issue #1609 2022-02-17 22:24:50 +08:00
00ccce7bb8 fix issue #1607 2022-02-17 22:02:51 +08:00
54b564b871 fix UT cases for package ghttp 2022-02-17 21:14:11 +08:00
5882a9dc21 Merge branch 'gjson_example' 2022-02-17 20:30:26 +08:00
144249fcff Implemented gjson Example
1.SetSplitChar
2022-02-17 20:29:38 +08:00
31ce55eb4d cli update 2022-02-17 17:52:48 +08:00
255b502460 README update 2022-02-17 17:15:09 +08:00
073869b354 downgrade otel version from v1.3.0 to v1.0.0 2022-02-17 15:47:08 +08:00
9fdf20b3e2 add SetError for ghttp.Request 2022-02-17 11:51:21 +08:00
2461ef9f29 fix issue #1597 2022-02-17 11:46:35 +08:00
f8f13bd905 Implemented gjson Example
1.Unmarshal 2.Encode 3.MustEncode 4.EncodeString 5.MustEncodeString 6.Decode 7.DecodeTo 8.DecodeToJson
2022-02-16 22:38:25 +08:00
948cb9ff7c enhance from issue #1589 2022-02-16 20:51:39 +08:00
fa39b9ee54 fix issue in UT cases for package gring 2022-02-16 15:31:01 +08:00
6d09328d6d improve package goai; add example for array items response definition 2022-02-16 15:28:40 +08:00
77fc8866bf fix issue #1567 2022-02-16 01:12:22 +08:00
a5cc03ff25 fix issue #1563 2022-02-16 00:47:23 +08:00
5ab959ba58 fix issue #1554 2022-02-16 00:26:06 +08:00
86b90ed4b6 enhancement from #1552 2022-02-15 23:55:05 +08:00
6ffdff7095 fix issue #1537 2022-02-15 23:43:47 +08:00
37c6320dd7 fix issue #1530 2022-02-15 23:04:37 +08:00
33367fd3ee Implemented gjson Example
1.ExampleValid 2.ExampleMarshal 3.ExampleMarshalIndent
2022-02-15 23:02:48 +08:00
3a1cd3d588 Merge branch 'master' of https://github.com/gogf/gf into gjson_example 2022-02-15 22:15:33 +08:00
4fc27f6509 Implemented gjson Example
1. ExampleLoad 2.ExampleLoadJson 3.ExampleLoadXml 4.ExampleLoadIni 5.ExampleLoadYaml 6.ExampleLoadToml
7.ExampleLoadContent 8.ExampleLoadContentType 9.ExampleIsValidDataType
2022-02-15 22:08:51 +08:00
f0b78253b2 fix issue #1605 2022-02-15 01:10:03 +08:00
2428b27168 fix issue #1488 2022-02-15 00:21:05 +08:00
01ba56c38b remove function Set for package gcfg 2022-02-14 17:20:27 +08:00
887cad3b96 fix issue #1458 2022-02-14 17:04:14 +08:00
14268aa1c0 fix issue #1405 2022-02-14 16:33:07 +08:00
23c00eb83f fix issue #1394 2022-02-14 16:08:26 +08:00
5f2047d61b fix issue in configuration StdoutColorDisabled for package glog; rename TempDir to Temp for package gfile 2022-02-14 14:50:25 +08:00
1f9d86f015 improve configuration read from package frame/gins 2022-02-14 11:46:20 +08:00
8cb6086f73 Implemented gjson Example
1. New 2.NewWithTag 3.NewWithOptions
2022-02-12 17:27:32 +08:00
a887cedb99 example update 2022-02-09 16:51:15 +08:00
1fb9be0628 improve trace feature for package gdb/gredis; add trace example cases 2022-02-09 02:49:29 +08:00
caf03b223b CI update 2022-02-08 23:57:57 +08:00
f77d388d4f CI update 2022-02-08 23:55:14 +08:00
d0cfeb2a8c CI update 2022-02-08 23:52:29 +08:00
0a6e4ebf18 CI update 2022-02-08 23:25:33 +08:00
dd34892857 CI update 2022-02-08 23:19:19 +08:00
af39eb4c9f CI update; Example update for package gcache 2022-02-08 23:13:33 +08:00
bd4948c084 fix UT case for package gdb 2022-02-08 16:38:10 +08:00
cea6cbc7db Merge pull request #1595 from stardemo/master
Update Github Action badge
2022-02-08 16:31:16 +08:00
54ccbfef98 tempale content update for cmd gf 2022-02-08 16:30:38 +08:00
88b124b29a UT cases for package gdb 2022-02-08 14:43:39 +08:00
7eff3bc697 Update Github Action badge 2022-02-02 11:18:22 +08:00
c3161d58fd improve registry for package ghttp 2022-01-29 21:42:48 +08:00
e2a0cb97ae up 2022-01-29 21:30:48 +08:00
4fae47db63 add secondary configuration node name for http server; improve package gsvc 2022-01-28 17:29:05 +08:00
48b5f37894 move grpc packages to katyusha 2022-01-28 16:23:44 +08:00
ff1755d2db cli update 2022-01-28 16:18:16 +08:00
f13ccd8527 Merge branch 'master' into feature-gsvc 2022-01-28 16:09:21 +08:00
a97d74b15c cli update 2022-01-28 16:07:00 +08:00
8b48f16508 improve service registry for package ghttp; improve service discovery for package gclient; improve cli 2022-01-28 16:00:16 +08:00
04eb654133 add error stack for internal error printing 2022-01-28 14:51:49 +08:00
1a000396e2 improve gf command gen dao 2022-01-28 10:27:33 +08:00
3a658cdb85 improve service registry for package ghttp/gclient 2022-01-27 18:12:39 +08:00
3cb578488c add service registry feature for package ghttp/gclient 2022-01-27 16:50:31 +08:00
c845d1d93d add Weight/RoundRobin/LeastConnection selector for package gsel; improve package balancer 2022-01-27 15:15:55 +08:00
d322e67117 fix string print for time only gtime.Time; improve package drivers 2022-01-27 12:04:46 +08:00
9ff17810a4 add raw grpc example using gsvc/resolver/registry-etcd 2022-01-26 23:43:48 +08:00
5f87591407 improve package gsvc 2022-01-26 22:23:54 +08:00
65c385c013 add etcd registry; add resolver; improve balancer 2022-01-26 20:51:17 +08:00
8094968605 README update 2022-01-26 17:05:30 +08:00
7ac9c46f12 mark underlying PostForm function deprecated for gclient.Client 2022-01-25 23:01:35 +08:00
01b9fa8ac9 improve package gcfg 2022-01-25 20:43:57 +08:00
adb4a1e6c0 README update 2022-01-25 10:21:59 +08:00
c371e5221a improve package gsel 2022-01-24 23:33:56 +08:00
c9529199a1 add package gsvc/gsel 2022-01-24 23:09:26 +08:00
f2e7f18d61 CI update 2022-01-24 16:32:59 +08:00
96044822a0 CI update 2022-01-24 16:12:32 +08:00
c469d0277f README update 2022-01-24 15:50:15 +08:00
221082b967 command -> cmd 2022-01-24 14:49:56 +08:00
2c2acfb5b8 README update 2022-01-24 14:47:22 +08:00
76b819ae3b move gf cli and gdb drivers into gf repo. 2022-01-24 14:41:23 +08:00
43f1354e79 fix configuration support for package gcmd 2022-01-24 10:32:19 +08:00
6e1c76efe6 add GetAdapter for package gcache; add GetStorage for package gsession 2022-01-23 15:14:06 +08:00
e517bf7b0e improve details for package gjson/gtcp/gudp 2022-01-22 15:45:38 +08:00
3b811c3434 add GetFreePort/GetFreePorts for package gtcp/gudp 2022-01-22 15:33:31 +08:00
9e3a49dd1b add GetFreePort/GetFreePorts for package gipv4 2022-01-22 15:12:58 +08:00
65d1648c30 improve seconds unit support in configuration for package gredis 2022-01-22 13:48:09 +08:00
a4d80bf743 move db drivers to github.com/gogf/gf/gdb-drivers 2022-01-21 18:06:35 +08:00
a15ec0d677 expose attributes of struct Result for package gdb 2022-01-21 17:43:00 +08:00
7e5301c845 expose insert option constants for package gdb 2022-01-21 17:31:48 +08:00
795ac4773e Merge branch 'master' of https://github.com/gogf/gf 2022-01-21 12:38:22 +08:00
c75cce0378 fix issue in package gjson for interface assertion of nil Json 2022-01-21 12:38:06 +08:00
5760289d2a Merge pull request #1574 from qinyuguang/gdb_ping
gdb Ping with context
2022-01-21 12:13:39 +08:00
619e256138 improve package gcron/gtimer 2022-01-20 15:53:16 +08:00
7401fb09c9 add examples for package gcmd 2022-01-19 23:35:23 +08:00
bb37e5ac88 remove Handler feature for gcmd.Parser 2022-01-19 21:07:48 +08:00
69935f3d1c remove ContainsOpt from package gcmd 2022-01-19 20:25:04 +08:00
3dcd9b535b UT update for package gclient/ghttp 2022-01-19 18:26:39 +08:00
e90f72b538 improve UT cases for package gtime 2022-01-19 18:23:04 +08:00
9efc2894d4 improve UT cases for package gtime 2022-01-19 18:18:30 +08:00
07c5ce0bbc improve UT cases for package gtime 2022-01-19 17:26:39 +08:00
3bbbe1db9c change pointer receiver that implements interface MarshalJSON to struct receiver for all packages 2022-01-19 16:55:57 +08:00
d7b94428ae fix issue in json marshal for package egtime 2022-01-19 16:44:58 +08:00
033e2c1d78 fix issue in rules of gmeta.Meta for package gvalid 2022-01-18 15:43:12 +08:00
9345eb5e94 dto -> do for package gdb 2022-01-17 21:10:58 +08:00
220ed74ad1 fix gstr.IsNumeric 2022-01-17 19:42:21 +08:00
658ca8c0fd Eg 2022-01-17 17:14:40 +08:00
56f88f759a add buildin function yamli for package gview 2022-01-17 17:10:44 +08:00
ee1585fb24 gdb Ping with context 2022-01-17 15:58:31 +08:00
c72a9f2e1e add buildin functions xml/ini/yaml/toml for package gview 2022-01-17 15:55:45 +08:00
d4b502f14e fix issue #1571 2022-01-15 22:15:10 +08:00
d32acabcef fix issue #1570 2022-01-15 21:38:15 +08:00
4943c3a9e0 add UT cases for package gjson 2022-01-15 20:25:29 +08:00
58290ec9ea fix issue in package ghash 2022-01-15 20:17:40 +08:00
6468d55a81 add absolute file path support for package gcfg/gview 2022-01-14 17:16:38 +08:00
fe93d7b332 add GetRegisteredRuleMap function, add internal logging for rule overwrite situation of package gvalid 2022-01-14 16:46:25 +08:00
067514b74f Merge branch 'master' of https://github.com/gogf/gf 2022-01-13 21:32:17 +08:00
aff2fbdc54 Merge branch 'master' of https://github.com/gogf/gf 2022-01-13 21:31:37 +08:00
805f60efa1 improve package ghash 2022-01-13 21:31:23 +08:00
b0b1b61280 Merge pull request #1555 from larryclean/master
修改gdb cache的key为gcache:md5(sql)方式
2022-01-13 21:29:55 +08:00
c09f22242f Merge pull request #1566 from qinyuguang/pgsql_dropped_field
gdb pgsql skip dropped fields
2022-01-13 20:57:31 +08:00
9892cc46e4 improve package ghttp 2022-01-13 20:57:13 +08:00
6e12aa4bf7 fix issue #1568 2022-01-13 20:49:26 +08:00
8731123030 add StdoutColorDisabled configuration for package glog 2022-01-13 15:22:27 +08:00
eaeb8e03ab gdb pgsql skip dropped fields 2022-01-13 14:20:01 +08:00
6ded700f92 add options for Decode/DecodeTo/DecodeToJson functions of package gjson 2022-01-13 12:09:04 +08:00
e5613e8690 improve function New for creating db by specified configuration node 2022-01-12 21:57:46 +08:00
45fbb5326c README updates 2022-01-12 20:43:36 +08:00
b09f4e9240 Merge branch 'master' of https://github.com/gogf/gf 2022-01-12 20:42:38 +08:00
c2f2ad7a28 README updates 2022-01-12 20:42:11 +08:00
0534994fa8 Merge pull request #1546 from eh-steve/eh-steve/gconv-map-recurse
Recurse map fields inside structs
2022-01-12 20:01:31 +08:00
9486f6e7e9 improve package gcmd/ghttp 2022-01-12 19:39:38 +08:00
343985ad12 Add tests to highlight problem cases previously failing 2022-01-10 18:53:32 +00:00
0f67559995 add gcode.WithCode 2022-01-10 22:58:29 +08:00
280c3b4a86 improve package gvar; remove gvar.Create 2022-01-10 20:33:09 +08:00
d4cb1666e5 improve package gclient for constants 2022-01-10 16:42:30 +08:00
bc29e86e58 Merge branch 'master' of https://github.com/gogf/gf 2022-01-10 15:50:15 +08:00
2e76268005 Merge branch 'gogf:master' into master 2022-01-10 10:34:37 +08:00
9abaf744f2 edit imports sort 2022-01-10 10:02:03 +08:00
6232c873b8 Revert "Use Copyfile() to back up the log, so as not to continue writing the log to the old file because the old fd is not closed #1366"
This reverts commit a3bab8db55.
2022-01-08 12:10:39 +08:00
a3bab8db55 Use Copyfile() to back up the log, so as not to continue writing the log to the old file because the old fd is not closed #1366 2022-01-08 12:02:56 +08:00
d30862373e 修正测试数据库配置 2022-01-07 22:25:00 +08:00
ee4ca43bd5 Safe() 2022-01-07 22:21:18 +08:00
3bed3e4f5b 修改gdb cache的key为gcache:md5(sql)方式 2022-01-07 22:14:47 +08:00
0dc1adb672 orderBy raw() 2022-01-07 21:06:49 +08:00
d045b4d2f5 make unit test compatible with go 1.15 2022-01-07 18:52:21 +08:00
572e71d76a add CookieOptions
add UnitTest
2022-01-07 17:10:21 +08:00
09f83bdd58 add panic for ghttp.Server.GetBody 2022-01-06 21:47:36 +08:00
c91b83969c WIP: add cookie security configuration 2022-01-05 14:33:20 +08:00
47cefbf6d7 允许多次调用Order 2022-01-05 11:53:50 +08:00
4cdddbd6e0 Recurse map fields inside structs 2022-01-04 19:22:18 +00:00
99455e328b Merge pull request #1535 from starccck/master
support manipulate pg.Array type data
2022-01-04 21:24:44 +08:00
ee25d696eb improve package gcmd 2022-01-01 20:20:49 +08:00
c17530a6db improve command not found error for package gcmd 2022-01-01 19:57:43 +08:00
0a7e4be4ef improve DoCommit for package gdb 2022-01-01 15:47:17 +08:00
c1586a3b81 improve package gcmd 2022-01-01 00:58:10 +08:00
09f9d1cb7a improve package gcmd 2022-01-01 00:18:50 +08:00
00692c50da improve package gaes 2021-12-31 14:24:07 +08:00
4663978fde improve package gaes 2021-12-30 23:02:34 +08:00
130a67c72b improve package gaes 2021-12-30 23:02:18 +08:00
fd5b0fdf49 comment update 2021-12-30 00:20:38 +08:00
f04715bccb support manipulate pg.Array type data 2021-12-29 00:13:22 +08:00
3932e0b15f add OmitEmpty support for WhereIn 2021-12-28 17:15:01 +08:00
b00de2c617 add gdb.DB.DoFilter; improve function gdb.DB.DoCommit for package gdb 2021-12-27 20:51:26 +08:00
14e96069f2 comment update for package gvalid 2021-12-26 23:17:33 +08:00
079cf9d7b8 add function EncodeString for package gjson 2021-12-26 16:16:16 +08:00
ca5c0cc84d add MustEncodeString for package gjson 2021-12-26 14:42:09 +08:00
984e5f98f7 add MustEncode for package gjson 2021-12-26 11:26:36 +08:00
b79e4a3ab7 add interface function ConvertDataForRecord for gdb.DB 2021-12-23 22:00:28 +08:00
fab17f89c4 fix issue in ut for package gsha1/gclient/ghttp/gregex 2021-12-23 00:34:02 +08:00
48c5c1e5a8 change errors wrapped by gerror.Wrap with error stack info for all packages 2021-12-23 00:09:00 +08:00
b9bb1ecd46 Merge branch 'master' of https://github.com/gogf/gf into feature/v2-gerror 2021-12-22 22:29:02 +08:00
2a8e2f9f2c Merge pull request #1524 from houseme/master
feat:improve tracing
2021-12-22 22:26:15 +08:00
e5f1b74bd9 Merge pull request #1527 from huangqian1985/master
tidy gstr files
2021-12-22 22:25:29 +08:00
cafd9098d7 change errors wrapped by gerror.Wrap with error stack info for all packages 2021-12-22 22:22:42 +08:00
b39b2374c4 Added Order() method support for gdb. 2021-12-22 20:51:03 +08:00
739490c62b revert file 2021-12-22 20:23:24 +08:00
8de8a0c97a Merge branch 'master' of https://github.com/gogf/gf 2021-12-22 20:01:50 +08:00
44089d70d4 Merge branch 'master' of https://github.com/gogf/gf into feature/v2-gerror 2021-12-22 18:28:04 +08:00
aabc1f8322 fix issue in time maintaining feature for package gdb 2021-12-22 17:42:26 +08:00
09493bbc36 Merge branch 'master' of https://github.com/gogf/gf 2021-12-21 23:25:10 +08:00
e389d73c65 Merge remote-tracking branch 'origin/master' 2021-12-21 23:25:04 +08:00
a9647a7bf3 tidy gstr file 2021-12-21 23:24:38 +08:00
ce93b625d4 change errors wrapped by gerror.Wrap with error stack info for all packages 2021-12-21 22:59:14 +08:00
bdf8244f7d Merge branch 'gogf:master' into master 2021-12-21 22:55:21 +08:00
7e81600772 improve package gjson 2021-12-20 00:32:23 +08:00
de17302ad0 fix issue in gstr.ReplaceI 2021-12-19 21:04:35 +08:00
25bdf10cc8 feat:improve tracing 2021-12-19 00:44:31 +08:00
02c6deaec8 feat:modify trace-ID to TraceID 2021-12-19 00:18:18 +08:00
63d384b676 help content update for pakcga egcmd 2021-12-18 23:27:41 +08:00
29a996e70e add Trace-Id response header for package ghttp 2021-12-18 21:54:12 +08:00
4978955404 fix issue in missing handler name for standard router handlers 2021-12-18 18:25:04 +08:00
a7c4597c97 Merge remote-tracking branch 'origin/master' 2021-12-18 17:20:50 +08:00
57a1a7607a improve package gsession 2021-12-18 17:14:33 +08:00
31772d5eac add fnction Mustremove for package gsession 2021-12-18 14:13:36 +08:00
77422f71f7 add fnction MustSet/MusetSetMap for package gsession 2021-12-18 14:10:55 +08:00
40225c5352 improve route dump for package ghttp;remove mutex for package gtag 2021-12-18 12:54:09 +08:00
ad48dc025b improve route dump for package ghttp 2021-12-18 12:43:33 +08:00
1215f67aac improve route dump for package ghttp 2021-12-18 12:36:34 +08:00
b9907ae3ba improve package gview for default folder searching 2021-12-17 21:38:10 +08:00
656d1bbbd6 improve content type response for ghttp.Server 2021-12-17 17:42:18 +08:00
20c0e6d68f error message update for package gconv 2021-12-17 17:28:02 +08:00
b27259aded fix issue converting empty map[string]string to map[string]interface{} 2021-12-17 17:22:55 +08:00
3658faafae improve help content printing for package gcmd 2021-12-17 15:47:48 +08:00
0b05c9e3e7 improve function gdb.Core.HasTable 2021-12-17 12:26:30 +08:00
f3c25ecba9 fix issue in ut for package gcache/gfsnotify 2021-12-17 12:11:40 +08:00
b9d6ac26d1 rename cache function from func() (interface{}, error) to func(ctx context.Context) (value interface{}, err error) for package gcache; add cache for function Tables of gdb.Core; improve Where condition with prefix handling for package gdb 2021-12-17 11:46:05 +08:00
f583f28953 rename SetTraceID to WithTraceID for package gtrace 2021-12-17 01:27:24 +08:00
b6d60fc209 downgrade otel version to v1.0.0 2021-12-17 00:55:48 +08:00
f72ba0b64d fix issue in ut of package internal/tracing 2021-12-17 00:11:41 +08:00
8f24dc3549 add SetTraceID for package gtrace 2021-12-17 00:06:38 +08:00
4de74464ac fix issue in unit testing case for package gctx/glog 2021-12-16 23:38:40 +08:00
fa45715416 go fmt for go 1.17 2021-12-16 23:26:41 +08:00
df68ce23d2 min required go version upgrade to 1.16 2021-12-16 23:18:12 +08:00
aee52fd56e enable OpenTelemetry in default for some core components 2021-12-16 23:09:37 +08:00
000483cc6f Merge branch 'master' of https://github.com/gogf/gf 2021-12-16 12:45:27 +08:00
f4e8eff813 improve help content printing for package gcmd 2021-12-16 12:45:00 +08:00
4143722f6f Merge pull request #1521 from huangqian1985/master
gstr Example Function
2021-12-16 10:05:01 +08:00
b0675400e3 Merge branch 'gstr_sample' 2021-12-15 21:18:55 +08:00
eb5332ea11 Merge branch 'master' of https://github.com/gogf/gf 2021-12-15 21:18:49 +08:00
ff2e9b568b Implemented gstr Example
1. PrefixArray 2.SubStrFrom 3.SubStrFromEx 4.SubStrFromR 5.SubStrFromREx
2021-12-15 21:15:34 +08:00
19c9f0a488 add DTO feature for package gdb 2021-12-15 00:01:59 +08:00
90e116fb9e Merge branch 'master' of https://github.com/gogf/gf 2021-12-14 23:54:53 +08:00
e28be8d114 reorder the sample function 2021-12-14 23:54:15 +08:00
36e05561cc improve Export feature for package gres 2021-12-14 23:49:08 +08:00
bc2ce19876 add Export feature for package gres 2021-12-14 23:01:20 +08:00
4c7e409e61 improve argument/option printing content for package gcmd 2021-12-14 22:34:06 +08:00
a4bb80b6fd Merge branch 'master' of https://github.com/gogf/gf 2021-12-14 21:13:58 +08:00
bb1a95fff8 fix issue in gproc.ShellExec 2021-12-14 21:01:36 +08:00
937845e67d Merge branch 'master' of https://github.com/gogf/gf 2021-12-14 16:14:04 +08:00
7d84ab761b improve package gcmd for help content printing 2021-12-13 20:30:56 +08:00
80daed6bdf add repeated checks for command name, argument name and short name for package gcmd 2021-12-13 20:18:13 +08:00
1015fb5338 improve package gcmd 2021-12-13 19:59:41 +08:00
e401ba0f43 Merge branch 'master' of https://github.com/gogf/gf 2021-12-11 23:11:35 +08:00
b4e6abc460 Adjust the function sequence 2021-12-11 23:11:17 +08:00
a1fb5f18dc improve package gcmd 2021-12-11 01:11:40 +08:00
780d06b19e improve package gcmd 2021-12-11 00:57:26 +08:00
3a20883a81 improve package gcmd 2021-12-11 00:12:58 +08:00
f0c25d8476 improve package gcmd/gtag 2021-12-10 23:58:10 +08:00
34e7913268 add internal logging for package gtrace 2021-12-10 23:26:53 +08:00
e10ba4cf67 improve stack filtering for package gdebug/glog 2021-12-10 22:54:32 +08:00
39bbca2a50 add stack filter of goframe module path for logging content 2021-12-10 18:52:35 +08:00
e02bdd875d add stack filter of goframe module path for logging content 2021-12-10 18:25:28 +08:00
3f24159636 add tracing configuration switch for whole framework 2021-12-10 18:08:36 +08:00
4769fbf383 Merge branch 'master' of https://github.com/gogf/gf 2021-12-09 23:49:53 +08:00
f25f8e8033 add argument feature for package gcmd 2021-12-09 23:49:39 +08:00
6a7722995e Merge pull request #1517 from huangqian1985/master
gpool Function Example
2021-12-09 22:34:45 +08:00
892619678e Merge branch 'master' of https://github.com/gogf/gf 2021-12-09 21:29:15 +08:00
8a2f49a4d2 Merge remote-tracking branch 'origin/master' 2021-12-09 21:28:52 +08:00
57a939e10b Implemented gpool All Example 2021-12-09 21:28:03 +08:00
01930c9899 improve package gcmd 2021-12-08 19:50:28 +08:00
4f0b45aeac improve package gcmd 2021-12-08 19:21:25 +08:00
b7b71795a4 improve package gcmd 2021-12-07 22:19:28 +08:00
9c41f2e3f8 improve package gcmd 2021-12-07 22:10:19 +08:00
a8d6363e79 inject Command into context and add function CommandFromCtx for package gcmd 2021-12-07 21:55:06 +08:00
5dcdb66794 add MustShell/MustShellRun/MustShellExec for package gproc 2021-12-07 21:13:50 +08:00
0c1de766bc Merge branch 'master' of https://github.com/gogf/gf 2021-12-07 21:03:23 +08:00
ad64a29145 add MustSet/MusetRemove for package genv 2021-12-07 21:03:06 +08:00
885ddd36fc Merge branch 'master' of https://github.com/gogf/gf 2021-12-07 19:09:09 +08:00
6a82fdb888 add config feature for package gcmd 2021-12-07 19:08:52 +08:00
02f01323f9 Merge pull request #1510 from huangqian1985/master
Validator Function Example
2021-12-07 19:07:54 +08:00
5af426d265 Merge branch 'gvalid_Example' 2021-12-07 13:50:11 +08:00
10fc81f716 modify gvalid sample file name 2021-12-07 13:49:08 +08:00
4b168f5579 Merge branch 'gvalid_Example' 2021-12-06 22:20:41 +08:00
a0a9ecfa20 Merge branch 'master' of https://github.com/gogf/gf into gvalid_Example 2021-12-06 22:20:15 +08:00
ff36667dbc move sample function to right file 2021-12-06 22:20:00 +08:00
667b6aa4ca Merge branch 'gvalid_Example' 2021-12-05 22:18:39 +08:00
e11698dc2a modify function name 2021-12-05 22:18:13 +08:00
dacc19ac98 Merge pull request #1508 from Hades300/GetRemoteIp-IPv6Fix
ghttp_request.go GetRemoteIp ipv6 fix
2021-12-05 21:59:20 +08:00
d330e9ac8f Merge pull request #1509 from victory460/master
fix a comment error in IsSubDomain
2021-12-05 21:57:43 +08:00
85d01f3d9e Merge branch 'gvalid_Example'
# Conflicts:
#	util/gvalid/gvalid_z_example_test.go
2021-12-05 15:01:08 +08:00
15fd815144 Merge branch 'master' of https://github.com/gogf/gf into gvalid_Example 2021-12-05 14:56:50 +08:00
68a8a456c9 move function sample to new file 2021-12-05 14:56:34 +08:00
2bb80593a7 Merge pull request #1511 from houseme/master
Update README.MD
2021-12-04 23:51:56 +08:00
58992fa0ba Merge branch 'master' of https://github.com/gogf/gf 2021-12-04 23:34:34 +08:00
0e3a8576b4 improve debugging feature 2021-12-04 23:07:54 +08:00
8586f31e03 github action 2021-12-04 22:44:02 +08:00
bca467cd15 github action 2021-12-04 22:43:30 +08:00
21215f6b2f github action 2021-12-04 22:36:13 +08:00
cb6095dc17 github action 2021-12-04 22:17:35 +08:00
8121b9c794 test commit 2021-12-04 21:29:37 +08:00
66450b0ecd disable debugging internal logging content in github action 2021-12-04 20:51:24 +08:00
a4d7cf14a7 Merge branch 'master' of https://github.com/gogf/gf 2021-12-04 20:50:09 +08:00
65fde53083 Update README.MD 2021-12-04 18:25:24 +08:00
acb2bc7d99 Merge branch 'master' of https://github.com/gogf/gf into gvalid_Example 2021-12-04 14:35:45 +08:00
7b9a03d13c Implemented Validator Example
1.RuleFunc 2.RuleFuncMap
2021-12-04 14:35:33 +08:00
b6df7b94d0 change MaxConnCount to 0 for ulimited connections for package gdb 2021-12-04 13:57:38 +08:00
71399d1f65 improve package gcmd 2021-12-04 00:26:45 +08:00
0da5535bda improve package gvalid 2021-12-04 00:11:57 +08:00
c74a33f04a README update 2021-12-04 00:07:49 +08:00
ecfedff32a README update 2021-12-04 00:07:05 +08:00
34bf315623 README update 2021-12-04 00:05:54 +08:00
3f030b1f6e improve error message for invalid rule for package gvalid 2021-12-03 23:56:00 +08:00
8de176d73f move package /net/ghttp/internal/client as /net/gclient 2021-12-03 23:32:00 +08:00
afc3367f31 auto enable dump feature for ghttp.Client 2021-12-03 17:49:26 +08:00
f56c2ed356 fix a comment error in IsSubDomain
Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2021-12-03 17:19:42 +08:00
e2fbce0420 ghttp_request.go GetRemoteIp ipv6 fix 2021-12-03 16:07:04 +08:00
80e8a58f45 add NeedArgs feature for package gcmd 2021-12-02 23:50:29 +08:00
26ef8c5872 add root tag in matadata of struct to specify the root command function for the object for package gcmd 2021-12-02 23:31:06 +08:00
b840405af6 improve error logging format for ghttp.Server 2021-12-02 21:22:02 +08:00
6aa39b3451 improve package gcfg 2021-12-02 20:55:41 +08:00
c1b75b9071 improve package gcmd 2021-12-02 20:27:26 +08:00
65e1048715 improve package gcron 2021-12-02 20:05:29 +08:00
9ed6ebbcff Merge pull request #1384 from kingeasternsun/processconflict
feat(fix bug , add nexttime feature):
2021-12-02 19:50:01 +08:00
e615528f17 Merge pull request #1506 from houseme/master
feat:add trace db.statement、host.name
2021-12-02 19:47:07 +08:00
261fa7e843 Merge pull request #1505 from jqb44179/feature/gfile_example
pull request by gfile example
2021-12-02 19:41:21 +08:00
5ed5adc6df feat:add trace db.statement、host.name 2021-12-02 18:54:56 +08:00
tom
632b7f34ae add gfile example 2021-12-02 17:27:53 +08:00
9659f45fbb Implemented Validator Example
1.Ci 2.Data 3.Assoc 4.Rules 5.Messages
2021-12-01 23:16:16 +08:00
30a597cadc Merge pull request #1501 from ehproject-teamer/master
update MarshalJSON example
2021-12-01 22:18:25 +08:00
e4e98caf8f Merge branch 'master' of https://github.com/gogf/gf into gvalid_Example 2021-11-30 23:49:34 +08:00
6b5f111b6a Implemented gvalid Example
1.New 2.Run 3.Clone 4.I18n
2021-11-30 23:48:26 +08:00
8f0c0337c5 update gtime example output 2021-11-30 23:10:02 +08:00
d87413fb23 Merge branch 'master' of https://github.com/ehproject-teamer/gf 2021-11-30 22:55:51 +08:00
0340fb7124 update gtime example 2021-11-30 22:53:28 +08:00
6c19844a2f Merge branch 'gogf:master' into master 2021-11-30 22:50:48 +08:00
dd0045e36f improve package gcmd 2021-11-30 16:43:42 +08:00
6acb2f46e6 update gtime example 2021-11-29 10:14:55 +08:00
578d8218bd go fmt 2021-11-29 10:08:12 +08:00
f754bdbb0e Update gtime_z_example_time_test.go 2021-11-29 10:05:52 +08:00
3ff77a87d4 add json 2021-11-28 23:57:49 +08:00
2ead7606b2 go fmt 2021-11-28 23:41:41 +08:00
1fdf85e3b8 update MarshalJSON example 2021-11-28 23:36:21 +08:00
18c4082bd2 Merge branch 'master' of https://github.com/gogf/gf 2021-11-27 20:54:15 +08:00
45e9e108bd add search folders for package gcfg 2021-11-27 20:54:02 +08:00
ec55463856 Merge pull request #1500 from huangqian1985/master
AVLTree Example And RedBlackTree Example
2021-11-27 20:37:02 +08:00
8944635bf9 modify "May Output" to "Output"
modify fuinction name
2021-11-27 20:07:39 +08:00
c4b45d2400 modify "May Output" to "Output" 2021-11-27 19:33:00 +08:00
b444a661c2 Merge branch 'master' of https://github.com/gogf/gf 2021-11-27 19:12:04 +08:00
085ac39231 Implemented RedBlackTree All Example 2021-11-27 19:11:14 +08:00
f5bd5a8748 Implemented AVLTree All Example 2021-11-27 18:09:16 +08:00
478f901595 Fix AVLTree MarshalJSON() Bug 2021-11-27 18:08:48 +08:00
5073413ffc improve TableFields feature for package gdb 2021-11-27 12:59:41 +08:00
7bdb4fe660 fix unit testing case for package gcache 2021-11-27 12:10:05 +08:00
bf8afc96e4 improve instance creating of database for package gins 2021-11-27 11:53:05 +08:00
817c3ce698 add Available function for Adapter of package gcfg 2021-11-27 01:36:21 +08:00
c33378540a add Available function for Adapter of package gcfg 2021-11-27 01:33:53 +08:00
c160500c7d Merge branch 'master' of https://github.com/gogf/gf 2021-11-27 01:10:14 +08:00
35cf228d83 add AdapterRedis for package gcache 2021-11-27 01:10:00 +08:00
b0eb76359e Implemented AVLTree Example
1.ExampleNewAVLTree 2.ExampleNewAVLTreeFrom
Implemented RedBlackTree Example
1.ExampleNewRedBlackTree 2.ExampleNewRedBlackTreeFrom
2021-11-27 00:04:43 +08:00
16a05f1450 Fix IteratorAscFrom() And IteratorDescFrom() Panic Bug 2021-11-27 00:02:19 +08:00
1749af1416 Merge branch 'master' of https://github.com/gogf/gf into gtree_Example 2021-11-26 23:37:07 +08:00
ae7685278d Merge pull request #1496 from huangqian1985/master
BTree Example
2021-11-26 23:32:49 +08:00
b63786cd75 Merge branch 'master' of https://github.com/gogf/gf into gtree_Example 2021-11-26 23:21:19 +08:00
e5c3444ea6 Merge branch 'master' of https://github.com/gogf/gf 2021-11-26 23:03:10 +08:00
0ded168715 Merge branch 'master' of https://github.com/gogf/gf into gtree_Example 2021-11-26 22:57:12 +08:00
a7b78b00b1 comment update for package gtree 2021-11-26 22:49:06 +08:00
a0c139f6a7 rename words and format output 2021-11-26 21:05:01 +08:00
b649c5aca8 Merge pull request #1486 from Hamster601/gvar_dev
add gvar example
2021-11-26 20:38:37 +08:00
56c13c2abf Merge pull request #1495 from mojo-zd/master
remove unnecessary code
2021-11-26 20:38:06 +08:00
e21cd301c2 Merge pull request #1499 from zxr615/fix_orderby_null
order by null is not escaped
2021-11-26 20:37:27 +08:00
656fb99b6a add test case 2021-11-26 11:48:15 +08:00
1725d247ae order by null is not escaped 2021-11-26 10:38:50 +08:00
85aa850539 Merge branch 'master' into gvar_dev 2021-11-26 10:25:49 +08:00
2cae1412f9 add line 2021-11-26 10:25:25 +08:00
f78d65833b Fix Left() And Right() Panic Bug 2021-11-25 23:56:51 +08:00
2c542cfd46 Implemented BTree Example
1.Keys 2.Values 3.Map 4.MapStrAny 5.Clear 6.Replace 7.Height 8.Left 9.Right 10.String 11.Search 12.Print 13.Iterator 14.IteratorFrom 15.IteratorAsc 16.IteratorAscFrom 17.IteratorDesc 18.IteratorDescFrom 19.MarshalJson
2021-11-25 23:55:36 +08:00
ab1f64a83e remove unnecessary code 2021-11-25 22:01:47 +08:00
9105590c69 improve chaining feature for ghttp.Client 2021-11-25 16:23:18 +08:00
fe1ca3cc22 format 2021-11-25 16:13:12 +08:00
c906990b63 add http instance function for package gins 2021-11-25 16:06:02 +08:00
23f13c0f6a 新增gvar使用示例 2021-11-25 15:50:58 +08:00
be0df90d05 add strict attribute for gcmd.Command for strict option parsing 2021-11-25 14:56:15 +08:00
65b6fbba84 Implemented BTree Example
1.GetVar 2.GetVarOrSet 3.GetVarOrSetFunc 4.GetVarOrSetFuncLock 5.SetIfNotExist 6.SetIfNotExistFunc 7.SetIfNotExistFuncLock 8.Contains 9.Remove 10.Removes 11.IsEmpty 12.Size
2021-11-25 07:25:29 +08:00
58a2e5a3b3 Merge branch 'master' of https://github.com/gogf/gf into gtree_Example 2021-11-24 23:23:50 +08:00
2866ee75a1 Implemented BTree Example
1.Clone 2.Set 3.Sets 4.Get 5.GetOrSet 6.GetOrSetFunc 7.GetOrSetFuncLock
2021-11-24 23:23:14 +08:00
f91b5b558a improve package gcmd 2021-11-24 22:45:34 +08:00
0db3a9f0f6 improve package gcmd 2021-11-24 22:27:09 +08:00
8442bab164 improve package gcmd 2021-11-24 22:15:23 +08:00
332de30fba improve package gcmd 2021-11-24 21:57:41 +08:00
c5541b484f improve package gtag/gcmd 2021-11-24 21:41:36 +08:00
7b22355abb expose package internal/structs as os/gstructs; add package gtag for custom tag storage feature 2021-11-24 16:17:50 +08:00
09be476fd9 Implemented BTree Example
1.NewBTree 2.NewBTreeFrom
2021-11-23 23:21:29 +08:00
e2abee7ba4 Merge branch 'master' of https://github.com/gogf/gf 2021-11-23 21:05:44 +08:00
6d62e071e4 fix issue in package goai 2021-11-23 21:05:31 +08:00
af289bcc7e Merge branch 'master' of https://github.com/gogf/gf into gtree_Example 2021-11-23 20:57:30 +08:00
c12404b378 add gtree example new file 2021-11-23 20:53:17 +08:00
8a22b129dd add gtree example new file 2021-11-23 20:52:57 +08:00
28fe100761 Merge pull request #1489 from huangqian1985/master
gmap Example and gvalid Example
2021-11-23 20:40:33 +08:00
0622b517c5 command object feature for package gcmd 2021-11-23 20:26:55 +08:00
d7da2b5657 Merge branch 'master' of https://github.com/gogf/gf 2021-11-23 20:22:00 +08:00
5415d6dc52 Merge branch 'master' into feature/gcmd-manager 2021-11-23 16:24:11 +08:00
1978a262a8 improve ScanList feature for pakcga egdb 2021-11-23 15:28:40 +08:00
9e21052a3c object feature for package gcmd 2021-11-23 14:08:37 +08:00
9748b9f70b improve association feature for package gvalid 2021-11-23 10:42:43 +08:00
a237495b66 modify CheckStruct to Run 2021-11-23 07:44:35 +08:00
00ac9069ee Merge branch 'master' of https://github.com/gogf/gf 2021-11-22 23:26:40 +08:00
7e3d7b3575 modify UnmarshalValue Sample 2021-11-22 23:11:40 +08:00
a96acf6eed improve dump feature for package gutil 2021-11-22 23:05:32 +08:00
bbc43520fb improve package gvalid 2021-11-22 22:47:00 +08:00
cea6e4c3d9 improve package gvalid 2021-11-22 22:43:09 +08:00
7e56bf700a Merge branch 'master' of https://github.com/gogf/gf 2021-11-22 21:10:52 +08:00
2728ab9e42 add "ci" rule Example 2021-11-22 21:04:24 +08:00
3be19e58e1 recursive validation feature for package gvalid 2021-11-22 20:28:47 +08:00
82ea10a59b Merge branch 'master' of https://github.com/gogf/gf 2021-11-22 15:27:38 +08:00
86a1721326 Merge branch 'master' into feature/recursive-validation 2021-11-22 14:45:53 +08:00
eaef2d865e add rule ci for package gvalid 2021-11-22 14:41:33 +08:00
dc1ad3dda4 gcmd manager feature 2021-11-22 11:23:46 +08:00
c94513f4aa add "bail" rule Example 2021-11-22 08:59:21 +08:00
bae18a92b7 Merge branch 'master' of https://github.com/gogf/gf 2021-11-22 00:27:10 +08:00
a3dfebffb4 output modify 2021-11-22 00:26:34 +08:00
f5920fff68 Merge branch 'master' of https://github.com/gogf/gf 2021-11-21 23:04:11 +08:00
e15a862cd2 Merge pull request #1463 from hailaz/master
add examples for package gfile
2021-11-21 22:47:03 +08:00
22b7b2b953 comment updates for package gcmd 2021-11-21 22:38:47 +08:00
dde4b75022 improve command feature for package gcmd 2021-11-21 13:11:28 +08:00
e936b376fb improve command feature for package gcmd 2021-11-21 13:09:45 +08:00
b58c5311d0 Implemented TreeMap Example 2021-11-21 12:44:59 +08:00
dbee5810dc merge master 2021-11-21 00:54:40 +08:00
8ea4b71e7a Implemented ListMap Example 2021-11-20 21:46:20 +08:00
3e5b3a6dad Implemented StrStrMap Example 2021-11-20 12:37:09 +08:00
61bc38fff6 Implemented StrStrMap Example 2021-11-20 12:27:01 +08:00
c047214a33 Merge branch 'master' of https://github.com/gogf/gf 2021-11-20 12:13:12 +08:00
7d75f6e7c5 Implemented StrStrMap Example 2021-11-20 12:13:05 +08:00
a99cc34243 Implemented StrStrMap Example 2021-11-20 12:12:32 +08:00
8db890c510 improve unit testing case for package gcache 2021-11-20 12:08:14 +08:00
1db2c31ecc Implemented StrIntMap Example 2021-11-20 08:47:44 +08:00
49edad0216 Implemented StrAnyMap Example 2021-11-20 08:13:10 +08:00
51fd87bc01 Implemented StrAnyMap Example 2021-11-20 07:49:56 +08:00
42673c383a merge master 2021-11-19 23:14:58 +08:00
9aeac45198 Implemented IntIntMap Example 2021-11-19 21:46:11 +08:00
d9a152b772 Merge branch 'master' of https://github.com/gogf/gf 2021-11-19 20:44:52 +08:00
cd9ea5697b Merge branch 'master' of https://github.com/gogf/gf 2021-11-19 15:23:34 +08:00
551ceef0e1 improve package gconv 2021-11-19 15:21:46 +08:00
b81a1e7c9c Merge pull request #12 from gogf/master
pr from master
2021-11-19 09:56:02 +08:00
0355ec6b21 doc: add code comments 2021-11-19 09:53:32 +08:00
076b15d71f Implemented IntAnyMap Example 2021-11-19 07:27:19 +08:00
d35daa0f72 Merge pull request #1487 from stardemo/master
add ci notice for go fmt
2021-11-18 22:36:36 +08:00
d138c5bff2 improve unit testing case for package gview 2021-11-18 22:33:36 +08:00
66d56396ca improve unit testing case for package gview 2021-11-18 22:16:54 +08:00
0c62c62a7a improve example for package gstr 2021-11-18 22:13:12 +08:00
7d6c9244cf Implemented AnyAnyMap Example Function:
1.Replace 2.LockFunc 3.RLockFunc 4.Flip 5.Merge 6.String 7.MarshalJSON 8.UnmarshalJSON 9.UnmarshalValue
2021-11-18 21:37:27 +08:00
7f33c101c8 Merge branch 'master' of https://github.com/giamyl/gf 2021-11-18 20:11:41 +08:00
07ac8aca41 fix unit testing cases for package gres/gview 2021-11-18 20:07:24 +08:00
de4db409ee improve gutil.Dump 2021-11-18 15:25:24 +08:00
712416f490 improve gutil.Dump 2021-11-18 15:20:37 +08:00
0d8c9d5cfb move "gofmt check pass" echo 2021-11-18 11:56:03 +08:00
9547277931 fix gofmt check cmd 2021-11-18 11:32:03 +08:00
02849956e8 add ci gofmt check notice 2021-11-18 11:23:51 +08:00
dcf5975334 Merge branch 'gogf-master' 2021-11-18 09:54:35 +08:00
747ed6c64d Merge branch 'master' of https://github.com/gogf/gf into gogf-master 2021-11-18 09:52:27 +08:00
e586e4d109 更新示例文件 2021-11-18 08:59:51 +08:00
be2a0f4a18 Delete gstr_z_all_example_test.go 2021-11-18 08:58:48 +08:00
a184d16f06 更新示例 2021-11-18 08:58:21 +08:00
f6facc7507 修改示例 2021-11-18 08:54:44 +08:00
7d7ceec1d6 Merge branch 'gogf:master' into master 2021-11-18 08:54:13 +08:00
3f4dff462d Merge branch 'master' of https://github.com/gogf/gf 2021-11-18 07:33:29 +08:00
36927b4371 Implemented AnyAnyMap Example Function:
1.Remove 2.Removes 3.Keys 4.Values 5.Contains 6.Size 7.IsEmpty 8.Clear
2021-11-18 07:32:29 +08:00
290200a490 修改示例表现形式 2021-11-18 06:26:27 +08:00
57ccc13e0c unit testing files renaming 2021-11-17 23:20:58 +08:00
ef29ee4804 Implemented AnyAnyMap Example Function:
1.Iterator 2.Clone 3.Map 4.MapCopy 5.MapStrAny 6.FilterEmpty 7.FilterNil 8.Set 9.Sets 10.Search 11.Get 12.Pop 13.Pops 14.GetOrSet 15.GetOrSetFunc 16.GetOrSetFuncLock 17.GetVar 18.GetVarOrSet 19.GetVarOrSetFunc 20.GetVarOrSetFuncLock
2021-11-17 23:18:35 +08:00
732664a1ff files renaming for package gdb 2021-11-17 22:01:17 +08:00
f2ef7454c2 improve prefix feature for package gdb 2021-11-17 21:29:46 +08:00
e4023cadce doc: add code comments 2021-11-17 19:50:03 +08:00
92b9af5d9e Merge branch 'master' of https://github.com/gogf/gf 2021-11-17 19:32:06 +08:00
51cc9c541f doc: add copyright 2021-11-17 14:14:19 +08:00
6ad7baeb2c remove gsmtp 2021-11-16 23:39:45 +08:00
266a4214c5 fix example for package gregex 2021-11-16 21:40:04 +08:00
67a479a2cd remove .example 2021-11-16 21:37:59 +08:00
459aaea6e1 .golangci.yml updates 2021-11-16 21:25:14 +08:00
9b93542e99 Merge pull request #1483 from houseme/master
improve code 'if block ends with a return statement, so drop this els…
2021-11-16 21:02:56 +08:00
0b9931a3a4 improve Dump feature for package gutil 2021-11-16 20:41:31 +08:00
bb4f72d1ec improve code Introduce according to grouping 2021-11-16 19:43:02 +08:00
e86ee052cb improve code import 2021-11-16 19:29:02 +08:00
c6efb5ee3b [feature] improve code range map 2021-11-16 17:21:13 +08:00
efcba5ecae Merge branch 'master' of https://github.com/gogf/gf 2021-11-16 07:36:23 +08:00
416a5173ae 1# Complete the AnyAnyMap Example Function (Not Implemented)
2# Implemented AnyAnyMap Example Function:
1.NewAnyAnyMap 2.NewAnyAnyMapFrom
2021-11-16 07:30:14 +08:00
cc9b3a08d0 splite gmap example file. 2021-11-16 07:20:18 +08:00
857ca4d978 URL encode and decode 2021-11-16 00:59:15 +08:00
0135d23b16 URL-encode according to RFC 3986 2021-11-16 00:56:38 +08:00
babb84a798 Merge branch 'gogf:master' into master 2021-11-16 00:45:34 +08:00
e92aaa0891 Merge branch 'master' of https://github.com/gogf/gf 2021-11-16 00:42:44 +08:00
939a9267c6 improve slice converting for package gconv 2021-11-16 00:41:47 +08:00
ff8633231f improve code 'if block ends with a return statement, so drop this else and outdent its block (golint)' 2021-11-16 00:26:10 +08:00
4e1bbd76f9 Merge branch 'master' of https://github.com/gogf/gf 2021-11-15 23:34:43 +08:00
570814cf6e gmap example function
1.NewFrom 2.NewHashMap 3.NewHashMapFrom
2021-11-15 23:34:25 +08:00
47a4c6b58c Merge pull request #1481 from houseme/master
improve code
2021-11-15 22:36:31 +08:00
4fa2a879d7 [feature] improve code gview 2021-11-15 20:49:02 +08:00
cd60a4aca7 [feature] improve code glog 2021-11-15 20:31:16 +08:00
b664982be3 [feature] improve code gfile gcfg 2021-11-15 20:26:31 +08:00
485785e023 improve example for package gqueue 2021-11-15 19:20:46 +08:00
5389a93ec8 Merge branch 'master' of https://github.com/gogf/gf 2021-11-15 19:16:40 +08:00
634cacd435 merge develop 2021-11-15 19:15:58 +08:00
61bf7a28d2 Merge pull request #1480 from huangqian1985/master
gring Example
2021-11-15 19:12:22 +08:00
e172c486c3 Merge pull request #1478 from houseme/master
Upgrade opentelemetry version to 1.2.0. Improved import, by group improt
2021-11-15 19:11:41 +08:00
da7ddd43f5 improve field filtering for list type parameters of function Data for ForDao models 2021-11-15 17:39:23 +08:00
98e5fb1542 improve field filtering for list type parameters of function Data for ForDao models 2021-11-15 17:27:35 +08:00
f99b037c60 improve field filtering for list type parameters of function Data for ForDao models 2021-11-15 17:06:04 +08:00
5a1209c82d developing recursive validation 2021-11-15 16:50:30 +08:00
8ddab7f0cc Merge branch 'gogf:master' into master 2021-11-14 22:50:53 +08:00
6cd8d008eb Modifying LockIteratorPrev to RLockIteratorPrev and its implementation 2021-11-14 21:35:00 +08:00
f4f1145424 gring example function
1.Set 2.Put 3.Move 4.Prev 5.Next 6.Link 7.Unlink 8.RLockIteratorNext 9.RLockIteratorPrev 10.SliceNext 11.SlicePrev
2021-11-14 21:33:23 +08:00
d7c121430e Merge branch 'master' of https://github.com/gogf/gf 2021-11-14 21:17:30 +08:00
e23704d694 improve package gvalid by adding extra internal variable for error message template, changing :xxx varibale name to {xxx} format 2021-11-14 21:00:34 +08:00
e4ddeb6033 Improved import, by group improt. 2021-11-14 18:24:38 +08:00
4cdd98dbf5 Merge branch 'master' of https://github.com/gogf/gf 2021-11-14 17:47:34 +08:00
ce16dad88f improve error handling for custom validation rule for package gvalid 2021-11-14 17:47:21 +08:00
b59ed1b943 Improved import, by group improt. 2021-11-14 15:37:24 +08:00
ea31af5364 Merge branch 'gogf:master' into master 2021-11-14 15:33:18 +08:00
ac2a95534e Merge pull request #1474 from ehproject-teamer/master
add gtime example test
2021-11-14 12:29:51 +08:00
1a7450b9e9 v2.0.0-beta 2021-11-14 11:36:59 +08:00
5ef8280c31 fix: gfile scan dir example 2021-11-14 00:08:31 +08:00
15deeb19b0 go fmt 2021-11-13 23:48:47 +08:00
d13bbb7a04 merge conflict 2021-11-13 23:46:18 +08:00
f2dc26a7b3 Improved gfile example 2021-11-13 23:42:03 +08:00
299e16bed1 Improved import, by group improt. 2021-11-13 23:34:16 +08:00
d864120353 Improved import, by group improt. 2021-11-13 23:30:31 +08:00
be03b3cdda Improved import, by group improt. 2021-11-13 23:23:55 +08:00
cfa3d817af update gtime example 2021-11-13 23:16:18 +08:00
2c716a88c4 gring example function
1.New 2.Cap 3.Len
2021-11-12 22:52:41 +08:00
89d2a896f1 Update gtime_z_example_basic_test.go 2021-11-12 12:16:08 +08:00
56648638aa Merge branch 'gogf:master' into master 2021-11-12 11:14:03 +08:00
741a790660 修改了示例的表现格式 2021-11-12 01:37:27 +08:00
684fa9b9c9 Merge pull request #1467 from 564104865/zhiwei
update cache
2021-11-11 23:53:45 +08:00
4e91039254 Update gcache_z_example_cache_test.go 2021-11-11 23:37:01 +08:00
195e167502 Update gcache_z_example_cache_test.go 2021-11-11 23:29:29 +08:00
01a50b06cb Update gcache_z_example_cache_test.go 2021-11-11 22:32:08 +08:00
9b663b4c2b Update gcache_z_example_cache_test.go 2021-11-11 22:18:01 +08:00
655426c322 Update gcache_z_example_cache_test.go 2021-11-11 21:19:33 +08:00
ae819ad44b Merge branch 'master' of https://github.com/ehproject-teamer/gf 2021-11-11 17:51:33 +08:00
50ad3f0f26 go fmt 2021-11-11 17:49:43 +08:00
413a8be037 Merge branch 'gogf:master' into master 2021-11-11 17:45:49 +08:00
da659817c5 complete gtime example 2021-11-11 17:41:31 +08:00
6d37515e14 Optimization gfile example 2021-11-11 13:01:32 +08:00
ae27afaeb4 Merge branch 'zhiwei' of https://github.com/564104865/gf into zhiwei 2021-11-10 16:46:20 +08:00
30f462288e Update gcache_z_example_cache_test.go 2021-11-10 16:39:26 +08:00
4862505c5e Merge branch 'gogf:master' into zhiwei 2021-11-10 16:37:56 +08:00
4b0a8f81d5 修改了ExampleEqual 示例的对比值 2021-11-10 01:47:03 +08:00
f889df8d50 go fmt 格式化 2021-11-10 01:27:59 +08:00
836be74d13 修改示例中结果为map输出的地方增加May 2021-11-10 01:12:22 +08:00
7f24f0637b 修改了部分示例 2021-11-10 01:03:04 +08:00
31d793fafb improve example for package gqueue 2021-11-10 00:20:00 +08:00
be274478d0 Merge branch 'zhiwei' of https://github.com/564104865/gf into zhiwei 2021-11-09 20:47:28 +08:00
5b8c91a877 Merge branch 'gogf:master' into zhiwei 2021-11-09 20:46:12 +08:00
95a4690e69 improve error feature for package gvalid 2021-11-09 17:50:14 +08:00
33694c8b47 fix: ExampleGetContentsWithCache intlog 2021-11-09 16:34:00 +08:00
14b7c591d0 fix "github.com/gogf/gf/v2/test/gtest" 2021-11-09 16:25:44 +08:00
72043d0657 Merge branch 'gogf:master' into processconflict 2021-11-09 16:11:07 +08:00
e0a0fcbde2 improve cache feature for package gdb 2021-11-09 16:06:31 +08:00
58dd8a29db fix: gflie size example dir default size 4k 2021-11-09 16:04:47 +08:00
1f83c00ebf fix: gfile size example fail 2021-11-09 15:49:00 +08:00
02e1d01f29 improve RuleFunc for package gvalid 2021-11-09 15:22:17 +08:00
e0db3c87cf improve RuleFunc for package gvalid 2021-11-09 14:31:16 +08:00
903299728f update Must Cache 2021-11-09 11:46:53 +08:00
c617ad6a04 Merge branch 'gogf:master' into zhiwei 2021-11-09 11:38:05 +08:00
814649e7a3 Merge branch 'master' of https://github.com/gogf/gf 2021-11-08 19:51:45 +08:00
d1b69142c4 improve unit testing case for package gcache 2021-11-08 19:51:32 +08:00
2d1593f78e Merge branch 'zhiwei' of https://github.com/564104865/gf into zhiwei 2021-11-08 12:12:15 +08:00
d61f7af60c update cache adapter 2021-11-08 12:12:10 +08:00
65140d1293 Merge branch 'gogf:master' into zhiwei 2021-11-08 12:11:19 +08:00
85299cd447 Merge pull request #1466 from mingzaily/master
add examples for container gqueue
2021-11-07 21:53:24 +08:00
091df972f1 improve example for package gcache 2021-11-07 21:52:27 +08:00
748040fb0b improve group router for package ghttp 2021-11-07 21:31:33 +08:00
df02ca764f add size example for gqueue 2021-11-07 16:52:28 +08:00
6f64c26349 Merge branch 'gogf:master' into master 2021-11-07 16:40:20 +08:00
072355dc2c Merge branch 'zhiwei' of https://github.com/564104865/gf into zhiwei 2021-11-07 16:05:17 +08:00
3ca2cad449 improve gutil.Dump 2021-11-07 00:32:16 +08:00
05bb81cd71 Merge branch 'master' of https://github.com/gogf/gf 2021-11-07 00:16:52 +08:00
fd9246358a Merge branch 'feature/gconv.ScanList' into develop 2021-11-07 00:16:26 +08:00
42c4b32720 add gconv.ScanList 2021-11-07 00:16:14 +08:00
2757647211 Revert "11"
This reverts commit 45787dd8e4.
2021-11-06 20:31:47 +08:00
45787dd8e4 11 2021-11-06 20:31:16 +08:00
38b797b42f finish example for gqueue 2021-11-06 16:27:17 +08:00
e8f6ebc154 Merge branch 'gogf:master' into master 2021-11-06 16:12:38 +08:00
e715ce0625 Merge pull request #1450 from DGuang21/feature-regex-example
add examples for package gregex
2021-11-06 11:35:15 +08:00
aceb586bef Merge pull request #1461 from Evil-king/master
add examples for InitSet of package gset
2021-11-06 11:34:17 +08:00
15f9b69b36 fix 2021-11-06 06:38:28 +08:00
0aabb7d990 update package gstr 2021-11-06 04:41:08 +08:00
b036767fc0 📝 add example 2021-11-06 01:47:00 +08:00
b967cf6224 📝 add example 2021-11-06 01:16:51 +08:00
1a596fe84d 📝 add example 2021-11-06 00:54:10 +08:00
64fa8d5282 📝 add example 2021-11-06 00:49:15 +08:00
99d2186c8c 📝 add example 2021-11-06 00:06:56 +08:00
24f759e00e 📝 add example 2021-11-05 23:56:08 +08:00
66731c9c66 Merge pull request #1459 from visualsun/master
Create garray_z_example_sorted_str_test.go
2021-11-05 23:27:56 +08:00
e5ec9cd676 Merge pull request #1452 from 564104865/zhiwei
gcache Examples
2021-11-05 23:24:20 +08:00
e7b63839c8 Update garray_z_example_sorted_str_test.go 2021-11-05 19:31:11 +08:00
2511c378f2 Create garray_z_example_int_test.go 2021-11-05 17:02:28 +08:00
3de37873dc Merge pull request #10 from gogf/master
pr from master
2021-11-05 15:02:25 +08:00
12514a0311 Update garray_z_example_sorted_str_test.go 2021-11-05 14:45:04 +08:00
8a9dd169e2 test: add gflie example 2021-11-05 14:30:50 +08:00
84046a060a Package gstr's All Example 2021-11-05 10:50:15 +08:00
a27eec7752 Delete gstr_z_example_test.go 2021-11-05 10:48:13 +08:00
4539a9a4ab 修改gstr测试用例包名为gstr_test 2021-11-05 10:42:44 +08:00
cffa098373 更新gstr为gf-v2版本 2021-11-05 10:35:01 +08:00
c663a0d9c5 修改gstr测试用例
修改gstr测试用例的错误
2021-11-05 10:20:36 +08:00
5b83b2375e Update gcache_z_example_cache_test.go 2021-11-05 09:41:49 +08:00
98d72fae25 Merge branch 'gogf:master' into zhiwei 2021-11-05 09:38:41 +08:00
041ebacb8c 添加gstr包的实例 2021-11-05 01:20:18 +08:00
4f2a22dd0e Merge branch 'master' of https://github.com/gogf/gf 2021-11-05 01:15:30 +08:00
4acc0e9876 gconv.ScanList 2021-11-05 01:15:11 +08:00
7be24776d5 Merge branch 'develop' of https://github.com/gogf/gf into develop 2021-11-05 01:07:19 +08:00
485706a676 improve ScanList feature for package gdb 2021-11-05 01:07:06 +08:00
ea7d963f20 IntSet 2021-11-05 00:56:59 +08:00
613958a4b6 IntSet finish 2021-11-05 00:50:44 +08:00
44023ea91d Merge pull request #1453 from Evil-king/master
gstrset Example Finish
2021-11-05 00:21:15 +08:00
ef7f7e35f8 update review 2021-11-05 00:04:24 +08:00
613a50428b Update gcache_z_example_cache_test.go 2021-11-04 23:23:40 +08:00
3091f61a26 update ExampleStrSet_Remove 2021-11-04 22:26:17 +08:00
5776b2596d Create garray_z_example_sorted_str_test.go 2021-11-04 22:17:32 +08:00
430102c995 update 2021-11-04 22:11:09 +08:00
2a2bb4f1e1 improve the example document 2021-11-04 21:39:28 +08:00
205243e8b9 update 2021-11-04 21:02:54 +08:00
d16ce643fd Merge branch 'zhiwei' of https://github.com/564104865/gf into zhiwei 2021-11-04 20:58:19 +08:00
e94eb8f668 Merge branch 'gogf:master' into zhiwei 2021-11-04 20:56:02 +08:00
357084e788 update cache 2021-11-04 20:55:01 +08:00
9a757acc88 Merge pull request #1438 from danvinhe/bugfix/i1435
Bugfix/i1435
2021-11-04 20:38:58 +08:00
3fb1c07eac Merge pull request #1454 from visualsun/master
Update garray_z_example_str_test.go
2021-11-04 20:29:33 +08:00
6050b14087 Update garray_z_example_str_test.go 2021-11-04 20:11:54 +08:00
58c1c1bb16 Merge pull request #1455 from huangqian1985/develop
Validator Rule Example
2021-11-04 19:33:06 +08:00
b6f6ab17f9 go fmt 2021-11-03 23:50:57 +08:00
7bcba437a0 update cache values 2021-11-03 23:44:16 +08:00
abf199bf61 Merge branch 'gogf:master' into zhiwei 2021-11-03 23:29:31 +08:00
9ea2db5c81 fix 2021-11-03 23:17:04 +08:00
7a6fb4a807 Merge branch 'master' of https://github.com/gogf/gf 2021-11-03 23:14:08 +08:00
c3a75f5568 logging content update for package gdb 2021-11-03 23:13:11 +08:00
c850c420fd fixCi 2021-11-03 23:06:24 +08:00
e045aaaf07 Merge branch 'master' of https://github.com/gogf/gf into develop 2021-11-03 23:05:23 +08:00
0cd40caf0c Merge branch 'gogf:master' into master 2021-11-03 22:57:44 +08:00
f2bb9d65c3 edit review 2021-11-03 22:49:30 +08:00
4e05795642 Modify variable name 2021-11-03 22:38:31 +08:00
1df52637e8 Merge pull request #1429 from osgochina/master 2021-11-03 22:38:21 +08:00
b83362cc2e Update garray_z_example_str_test.go 2021-11-03 22:34:43 +08:00
274052511c Complete the following verification rule example method
1.mac 2.url 3.domain 4.size 5.length 6.min-length 7.max-length 8.between 9.min 10.max 11.json 12.integer 13.float 14.boolean 15.regex
2021-11-03 22:20:05 +08:00
32bc1ec064 Merge pull request #1432 from danvinhe/hotfix/i1421
Hotfix/i1421
2021-11-03 22:08:30 +08:00
5fa62e02c6 Update garray_z_example_str_test.go 2021-11-03 18:08:44 +08:00
bf3c3367a6 Update garray_z_example_str_test.go 2021-11-03 17:14:49 +08:00
9c05682605 change some example for gqueue 2021-11-03 16:16:03 +08:00
8f090739d9 go fmt 2021-11-03 15:23:51 +08:00
7971177c58 newredis 2021-11-03 15:16:07 +08:00
5707763758 Merge branch 'gogf:master' into zhiwei 2021-11-03 15:07:32 +08:00
35a786d765 Update gdb_func.go 2021-11-03 15:05:25 +08:00
12fe41e34d Merge branch 'master' into bugfix/i1435 2021-11-03 15:04:22 +08:00
5ffd362b6e Update glog_logger.go
多了个空格
2021-11-03 15:02:21 +08:00
a423fba2a8 comment or be unexported
exported method Redis.UpdateExpire should have comment or be unexported
2021-11-03 14:59:28 +08:00
41d0832fa5 Merge branch 'master' into hotfix/i1421 2021-11-03 14:55:02 +08:00
5e7b0c9303 Merge branch 'master' of https://github.com/gogf/gf 2021-11-03 13:27:49 +08:00
0c43e7986f improve function gutil.Dump/DumpWithType 2021-11-03 13:27:37 +08:00
bc1d76a796 add example for gqueue 2021-11-03 11:41:34 +08:00
6b9f72d973 📝 add example 2021-11-03 11:28:54 +08:00
d980cff663 📝 add example 2021-11-03 11:22:17 +08:00
7de69db707 232234 2021-11-03 10:16:41 +08:00
5e34aee2d7 example over 2021-11-03 00:49:06 +08:00
797719d8d5 Complete the following verification rule example method
1. passport 2.password 3.password2 4.password3 5.postcode 6.resident-id 7.bank-card 8.qq 9.ip 10.ipv4 11.ipv6
2021-11-02 23:47:25 +08:00
6c3aa6ede5 📝 add example 2021-11-02 20:08:15 +08:00
18459ec1bc Merge pull request #1449 from mingzaily/master
Example for glist
2021-11-02 19:37:47 +08:00
e727788f42 Merge branch 'gogf:master' into master 2021-11-02 14:33:13 +08:00
3df7711e74 complete example for glist 2021-11-02 14:31:34 +08:00
c1f856fa8e update 2021-11-02 13:27:54 +08:00
8ffc7699d6 Merge pull request #9 from gogf/master
pr from master
2021-11-02 11:25:49 +08:00
a3eff53c69 Modify "date" rule Example 2021-11-02 11:22:34 +08:00
56c12ad7c3 fix unit testing case for pakage gfile 2021-11-02 09:56:53 +08:00
77a0f59cd3 add automatic adding OmitNil option for data and where filtering if given struct name is defined like 'xxxForDao' 2021-11-02 09:55:37 +08:00
94768530cc Complete the following verification rule example method
1. datetime 2.date-format 3.email 4.phone 5.phone-loose 6.telephone
2021-11-02 00:03:44 +08:00
79a233eb78 example&comment update 2021-11-01 19:46:39 +08:00
183d800f4c 📝 add example 2021-11-01 12:17:53 +08:00
191ad20436 Complete the following verification rule example method
1. date
2021-10-31 23:16:54 +08:00
c0c68d1e46 rename Println -> Print for package glog 2021-10-30 20:47:38 +08:00
ac6968edf1 improve Dump feature 2021-10-30 20:35:55 +08:00
e22e1d0e4a remove function Println from package glog 2021-10-30 19:44:22 +08:00
42e27dd14c add context parameter for package grpool 2021-10-30 18:09:58 +08:00
d817047c98 remove Logger interface from package gdb 2021-10-30 16:12:51 +08:00
e15cd6ae89 fix issue in package gcache 2021-10-30 16:00:38 +08:00
17e6063c5c add neccessary parameter context for package gcron/gtimer 2021-10-30 15:36:10 +08:00
a8b2a2ff33 Merge remote-tracking branch 'origin/develop' into develop 2021-10-29 22:46:00 +08:00
4b3eb09492 Complete the following verification rule example method
1. required 2.required-if 3.required-unless 4.required-with 5.required-with-all 6.required-without 7.required-without-all 8.same 9.different 10.in 11.not-in
2021-10-29 22:44:35 +08:00
d1c09cb21d 完成以下校验规则示例方法
1. required 2.required-if 3.required-unless 4.required-with 5.required-with-all 6.required-without 7.required-without-all 8.same 9.different 10.in 11.not-in
2021-10-29 22:37:38 +08:00
1188793f8f automatically add column prefix for where conditions 2021-10-29 16:57:56 +08:00
09b8df1818 add WherePrefix/WhereOrPrefix for gdb.Model 2021-10-29 15:49:08 +08:00
6192d32501 add LeftJoinOnField/InnerJoinOnField/InnerJoinOnField/FieldsPrefix/FieldsExPrefix for package gdb 2021-10-29 15:12:31 +08:00
a6a8d787e4 merge IgnoreEmptySliceWhere feature into OmitEmptyWhere 2021-10-29 10:50:14 +08:00
e5c6d3f777 fix issue in unit testing cases for package gjson 2021-10-28 23:46:24 +08:00
1bfa792ea9 fix context canceled error while propagate context from http.Request 2021-10-28 23:37:51 +08:00
8ef4f68215 add IgnoreEmptySliceWhere feature for package gdb; add OriginValueAndKind/OriginTypeAndKind functions for package internal/utils 2021-10-28 23:18:23 +08:00
493f5dcff2 remove unused functions for package gdb 2021-10-27 15:41:15 +08:00
2cf84e020f add automatically detectting feature for 'in' attribute of parameters for package goai;add 'datetime' rule for package gvalid 2021-10-27 15:33:29 +08:00
e21bd9b4cb Update gcron_schedule.go 2021-10-27 10:44:28 +08:00
ded94276a8 Merge branch 'master' into processconflict 2021-10-27 10:33:36 +08:00
a19ba3d530 add embedded struct fields overwrite feature for package internal/structs 2021-10-26 21:57:56 +08:00
e0674ee7fe improve openapi implements 2021-10-25 21:23:47 +08:00
2481435829 improve openapi implements 2021-10-25 21:06:24 +08:00
e48b565e18 improve openapi implements 2021-10-25 20:36:09 +08:00
f6c2206b88 improve logging content field name from selected/updated to rows 2021-10-25 19:50:52 +08:00
4717e01708 replace gopkg.in/yaml.v2 with gopkg.in/yaml.v3 2021-10-25 19:17:56 +08:00
17861fc45d add short tags for default for package goai 2021-10-25 14:25:35 +08:00
a92c31168a add short tags for summary/description for package goai 2021-10-25 10:50:01 +08:00
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
f901f19714 Parameters of type gdb.Raw do not require special treatment 2021-10-15 17:45:30 +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
e0c4f7ccbf Fixed: #1421 2021-10-09 18:32:59 +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
5a5809bd95 修复gini的bug。
当ini的配置值中含有"="时候,不能正确解析。
2021-10-08 16:17:58 +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
b826ed6b03 Merge branch 'gogf:master' into master 2021-09-24 10:25:38 +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
2891c8e29d Merge branch 'gogf:master' into master 2021-09-23 19:05:53 +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
cfc1f8fbe4 use english doc 2021-09-17 09:27:31 +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
a72493f320 Merge branch 'master' into processconflict 2021-09-16 11:32:54 +08:00
0d9d7b8e04 Merge branch 'gogf:master' into master 2021-09-16 11:31:38 +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
c323256812 Merge branch 'master' into processconflict 2021-09-15 18:54:46 +08:00
26584cdbb4 Merge branch 'gogf:master' into master 2021-09-15 18:52:59 +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
5820e6ebe1 Merge branch 'gogf:master' into master 2021-09-13 15:11:01 +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
a6c9a7a944 fix test 2021-09-03 19:35:19 +08:00
e782facdf3 Merge branch 'gogf:master' into master 2021-09-03 14:39:58 +08:00
077a41911b Merge pull request #1390 from houseme/master
fix #1389
2021-09-03 10:54:03 +08:00
cc60bc9dab fix issue printing to stdout using fmt.Fprintf for package glog 2021-09-01 16:14:17 +08:00
425ca8aa3e improve process comminucation folder creating for package gproc 2021-09-01 15:02:58 +08:00
73d2b7ed06 fix issue #1387 2021-08-30 22:26:02 +08:00
0048e2c8c4 improve package gstr 2021-08-30 14:29:04 +08:00
adee4ac8dd fix #1389 2021-08-29 12:23:22 +08:00
549adf6487 improve unit testing case for package gdb 2021-08-27 20:35:35 +08:00
b5502c5580 revert and use 2021-08-27 20:26:07 +08:00
46bf669cdd Merge branch 'master' of https://github.com/gogf/gf 2021-08-27 20:16:41 +08:00
fa7a3e987d improve With feature for package gdb 2021-08-27 20:16:29 +08:00
b316b9c073 example updates for package gcache 2021-08-27 01:01:41 +08:00
5b57c35522 comment updates for package gcache 2021-08-27 00:01:15 +08:00
b9a07b104a Update gcron_schedule_test.go
add test to slash template parse
2021-08-26 10:58:54 +08:00
c7b379e53f Merge branch 'master' into processconflict 2021-08-26 09:33:23 +08:00
e0a3233ea3 improve package gcron 2021-08-26 00:11:27 +08:00
1b588b14d8 Merge branch 'master' of https://github.com/gogf/gf 2021-08-25 23:46:16 +08:00
2c839db941 Merge pull request #1372 from gzhmt-developer/master
fix tcp http demo error content-length
2021-08-25 23:42:30 +08:00
f9eaa8f930 fix issue of nested transaction missing in function operations for package gdb 2021-08-25 22:31:59 +08:00
59397fd8a5 add buildin function add/minus/times/divide for package gview 2021-08-25 20:00:53 +08:00
6be582355c improve DB.Close for package gdb 2021-08-25 10:58:29 +08:00
ac73851f78 Merge branch 'master' into processconflict 2021-08-25 09:28:04 +08:00
257897763d Merge branch 'master' of https://github.com/gogf/gf 2021-08-25 00:54:47 +08:00
29d50994ae add function Close for DB for package gdb 2021-08-24 22:59:25 +08:00
b129ee3f04 fix issue in unit testing case for package ghttp 2021-08-24 21:35:49 +08:00
a47699bf6e fix issue in unit testing case for package gjson 2021-08-24 21:34:14 +08:00
66b8b591df fix issue in missing import for package gcode 2021-08-24 21:31:15 +08:00
7b47fe96dd update version of third-party redigo from v2.0.0+incompatible to v1.8.5 2021-08-24 21:22:58 +08:00
abc8e62d58 add package gcode and improve error implements for package gerror 2021-08-24 21:18:59 +08:00
22e3fddf8d feat(fix bug , add nexttime feature):
1. fix bug: "Mon Jul 9 23:35 2012", "0 0 0 * Feb Mon/2". wo should get 1,3,5,7
2. add function to get the next run time
2021-08-23 23:12:16 +08:00
ef36cf8446 fix issue in example of package gjson 2021-08-20 23:15:48 +08:00
c5345239fc improve logging content for package gcron 2021-08-20 15:49:45 +08:00
a229960218 add context id feature for package gctx/glog 2021-08-20 15:44:08 +08:00
43180ef239 improve package gcron 2021-08-20 14:09:15 +08:00
e10240bd7c improve package gcron 2021-08-20 11:52:22 +08:00
a0ef6fce81 add bacth registering function Map for package ghttp 2021-08-19 20:59:08 +08:00
314bee2b4e remove context key printing into logging content for context feature of package glog 2021-08-19 15:35:41 +08:00
050c93ee8d Merge branch 'develop' of https://github.com/gogf/gf 2021-08-19 14:12:04 +08:00
feefcc98ef improve condition parameter of struct by sequence for package gdb 2021-08-19 14:11:28 +08:00
8f4ce91361 improve condition parameter of struct by sequence for package gdb 2021-08-19 14:09:31 +08:00
f03f56ba4e improve gconv.Struct for map attribute converting 2021-08-19 11:28:25 +08:00
457d552fa0 add UnmarshalJSON interface support for package gconv 2021-08-17 16:51:29 +08:00
be2fcf7f57 add UnmarshalJSON interface support for package gconv 2021-08-17 16:30:47 +08:00
ad6c4f5245 improve session storage for package gsession 2021-08-16 21:47:45 +08:00
db621e38d9 improve ServeFile/ServeFileDownload for package ghttp 2021-08-16 20:30:58 +08:00
170af1ab00 Merge pull request #1374 from wangle201210/develop
add func SetWriterColorEnable for file log color
2021-08-15 23:52:10 +08:00
31ef4e7b5a fmt 2021-08-13 13:27:43 +08:00
f56f689970 fmt 2021-08-13 13:24:28 +08:00
17b73e7cb3 add func SetWriterColorEnable for file log color 2021-08-13 13:20:33 +08:00
903f29a824 add OmitNil feature for package gdb 2021-08-13 11:28:47 +08:00
12f2193963 improve handler feature for package glog 2021-08-12 22:14:31 +08:00
13ecbc263e improve handler feature for package glog 2021-08-12 21:58:06 +08:00
7b9888c004 add FieldCount/FieldSum/FieldMax/FieldMin/FieldAvg functions for gdb.Model 2021-08-12 19:42:44 +08:00
91cd4f96f0 Update gtcp_conn.go 2021-08-12 10:50:46 +08:00
95a44122dd comment update for package glog 2021-08-12 10:47:05 +08:00
2bd76dfdde go fmt code 2021-08-12 09:35:57 +08:00
26895294f9 Merge pull request #1 from gzhmt-developer/ansionfor-patch-1
fix tcp demo error content-length
2021-08-12 00:23:04 +08:00
4cd4559784 fix tcp demo error content-length 2021-08-12 00:21:36 +08:00
3fc96f2bd0 add package gctx 2021-08-11 13:20:00 +08:00
91dd9e2bf9 auto update value of time field if given time value is zero for package gdb 2021-08-10 20:30:32 +08:00
9c5642f141 fix issue in border value checks for gstr.CompareVersion/CompareVersionGo 2021-08-10 19:29:54 +08:00
00f0a743fc add function TestDataContent for package gdebug 2021-08-10 17:20:15 +08:00
232751e3db improve context key and caller path&func outputs for logger of package glog 2021-08-10 15:46:40 +08:00
1c600d5b20 revert ORM logger from interface to glog.Logger 2021-08-10 15:36:15 +08:00
9bc3b44a61 version updates 2021-08-09 19:30:16 +08:00
83729f18ad Merge branch 'develop' 2021-08-09 19:29:46 +08:00
fdb6e70322 comment update for package glog 2021-08-09 19:29:11 +08:00
efaf3d591c comment update for package glog 2021-08-09 19:25:23 +08:00
ef50eb6d6b comment update for package ghttp 2021-08-09 19:16:37 +08:00
fb5a1f2306 Merge pull request #1369 from wangle201210/develop
fix print log on windows
2021-08-09 19:16:24 +08:00
9d4382d12e fmt 2021-08-08 16:58:15 +08:00
9ee76ecc93 fix print log on windows 2021-08-08 16:23:25 +08:00
0d2ca48d16 update comment and standardize const naming for package gproc 2021-08-08 14:05:27 +08:00
f1857df5e2 comment update for package glog 2021-08-08 13:56:26 +08:00
fc1dfb7ff9 comment update;standardize const naming for package gtcp/gudp 2021-08-08 13:10:21 +08:00
dc407bf293 merge develop 2021-08-07 12:04:31 +08:00
4eb057227c add SizeFormat function for package gfile; add more internal logging for rotation feature for pacakge glog 2021-08-07 11:59:30 +08:00
9cd944fd77 improve time maintaining feature for package gdb 2021-08-07 11:01:15 +08:00
cd3593182a improve package gerror/ghttp for error code handling 2021-08-07 10:44:57 +08:00
0f6820df9e add more unit testing case for package gtimer 2021-08-06 14:13:37 +08:00
0e158903c2 improve package gtimer for priority checks 2021-08-06 12:08:49 +08:00
214d0513e5 Merge branch 'develop' of https://github.com/gogf/gf into develop 2021-08-05 19:15:31 +08:00
75ca866991 fix issue in ghttp.Server 2021-08-05 19:15:18 +08:00
f22aa1b5d6 Merge pull request #1361 from jroam/fixbug-garray 2021-08-05 13:09:31 +08:00
00d7ee93b2 improve package gerror 2021-08-05 11:40:31 +08:00
537cbf983e edit some function annotations 2021-08-04 23:35:29 +08:00
4c54b1cfbc improve errcode feature for package gerror 2021-08-04 20:50:45 +08:00
e9ea58df64 Merge branch 'master' of https://github.com/gogf/gf 2021-08-04 13:29:17 +08:00
65fff6feae version updates 2021-08-04 13:29:06 +08:00
dbded5e753 Merge pull request #1365 from stardemo/master
Update Readme ,Github Action badge
2021-08-04 13:15:02 +08:00
3043645605 Update Readme ,Github Action badge 2021-08-03 23:29:34 +08:00
685bf56a30 fix issue #1325 2021-08-03 22:21:20 +08:00
a4497ed547 improve gdb.Modle for where holder 2021-08-03 21:32:05 +08:00
28cb0bef25 change logger of DB from glog.Logger to interface Logger 2021-08-03 20:34:26 +08:00
114cdb2351 improve package gtimer 2021-08-03 19:37:25 +08:00
a2bb8ad2f2 add more unit testing case for package gdb 2021-08-02 21:13:00 +08:00
5a4de52900 fix invalid separator char in packing with prefix folder string in OS widnows for package gres 2021-08-02 19:58:04 +08:00
ff70e54e3e fix unit testing case for package gtrace 2021-08-02 09:50:44 +08:00
fddc21670a add condition and order-by feature for with tag feature for package gdb 2021-08-02 00:38:56 +08:00
f02372cf58 improve package gvalid 2021-08-01 23:50:44 +08:00
ab5f809074 go.sum updates 2021-08-01 22:13:20 +08:00
121c1a0125 Merge branch 'develop' of https://github.com/gogf/gf into develop 2021-08-01 22:13:00 +08:00
7678540270 add bail rule for package gvalid 2021-08-01 22:12:44 +08:00
248e6ff134 bugfix garray Sort 2021-08-01 15:19:48 +08:00
839ebd5b51 Merge pull request #1360 from houseme/master
Update go.mod
2021-08-01 11:29:36 +08:00
fa64df6f91 improve package gdb/glog 2021-08-01 10:33:33 +08:00
0acd118c03 add ModelHandler feature for package gdb 2021-08-01 10:17:03 +08:00
2b5244a54b unit testing cases update for package gredis/glog 2021-08-01 09:45:46 +08:00
2472dd5fac github action updates 2021-08-01 09:33:12 +08:00
5899f676f7 Merge pull request #1347 from stardemo/develop
add basic action scripts
2021-08-01 09:17:31 +08:00
bb57dc1ae7 improve request context feature for package ghttp 2021-08-01 09:17:37 +08:00
5a6c2c27df inject Request object into context 2021-07-30 17:17:13 +08:00
9f096fc63d improve error code for package gerror 2021-07-30 16:21:45 +08:00
4267aadd78 remove controller feature from package ghttp 2021-07-30 15:15:44 +08:00
ef77a54c7e improve OmitEmpty feature for package gdb; mark package gmvc deprecated 2021-07-30 14:58:23 +08:00
afb0af4afd add example for package gvalid 2021-07-30 11:29:48 +08:00
9be92cc3d4 garray代码规范化 2021-07-28 22:18:06 +08:00
15aabfb4e7 Update go.mod
update otel v1.0.0-RC1 to otel v1.0.0-RC2
2021-07-28 21:32:08 +08:00
c83e899f1f add go version matrix 2021-07-22 09:29:26 +08:00
ebe90dcaa8 fix issue in Cache Penetration for cache feature of package gdb 2021-07-21 19:24:16 +08:00
1c3ae11eba Update go.yml 2021-07-21 11:18:10 +08:00
b718aa88a2 add report && i386 test 2021-07-21 00:02:15 +08:00
6240c3d90b disabled error test case to test action 2021-07-20 23:35:07 +08:00
c78f9d19f5 Update go.yml 2021-07-20 23:26:53 +08:00
0ddacdd7e2 add error code for components 2021-07-20 23:02:02 +08:00
f8486474aa fix scripts path 2021-07-19 23:23:24 +08:00
906c54ce61 add basic action scripts 2021-07-19 23:20:51 +08:00
f72d991c36 rename attribute names from lower-camel case to upper-camel case 2021-07-19 20:06:44 +08:00
528f0e5434 Merge branch 'feature/new-register-type' into develop 2021-07-19 19:41:09 +08:00
88009ee278 fix issue #1341 2021-07-15 22:19:00 +08:00
b192b7dd60 remove internal logging for package gtimer 2021-07-15 21:46:56 +08:00
03d51bd18c add internal logging for package gtimer 2021-07-15 21:40:26 +08:00
5c6c932a75 merge master 2021-07-15 21:23:36 +08:00
92c3c136f9 improve color feature for package glog 2021-07-15 21:20:29 +08:00
5069436fd2 Merge pull request #1346 from goflyfox/dev
update pgsql pri error #1340
2021-07-15 21:18:52 +08:00
141ba2e951 update pgsql pri error #1340 2021-07-15 14:53:21 +08:00
fae4dea37a improve color feature for package glog 2021-07-15 13:31:32 +08:00
860b22aba4 Merge pull request #1312 from wangle201210/develop
add log level prefix color
2021-07-15 09:16:27 +08:00
30dbccf99e 输出对应err 2021-07-14 21:28:23 +08:00
9b2497bc57 Merge branch 'develop-up' into develop
* develop-up: (38 commits)
  revert gerror usage for package gvalid
  unify error package to gerror
  add CtxStrict feature for package gdb
  rename constants of package gpage from skake to upper camel case
  add context for intlog
  improve Record/Result converting for package gdb
  add context for intlog/gsession;improve struct/structs converting for package gconv
  unify command or enviroment key names for packages
  improve details for package glog
  add file configuration support for logger in ghttp.Server
  version updates
  add more unit testing cases for package ghttp
  add automatic fields mapping and filtering for Model.Where statements
  improve Order feature for package gdb
  improve function Increment/Decrement for package gdb
  add auto fields filtering feature for function Scan of package gdb; mark funtcion Struct/Structs deprecated for gdb.Model
  improve record converting for package gdb
  improve transaction feature for package gdb
  improve caller path filtering for package gdebug
  improve caller path filtering for package gdebug
  ...

# Conflicts:
#	os/glog/glog_logger.go
#	os/glog/glog_logger_config.go
#	os/glog/glog_logger_level.go
2021-07-14 21:12:18 +08:00
0140808460 add handler extension feature for package ghttp 2021-07-13 23:01:31 +08:00
84aa30d9c2 允许日志文件中添加颜色 2021-07-13 22:45:35 +08:00
bc724deb5e 日志内容区分文件和控制台输出 2021-07-13 21:43:07 +08:00
fbfc23211c fix issue in Counter of package gdb 2021-07-13 19:37:16 +08:00
3d4d3a763a comment update for package gfsnotify 2021-07-12 22:05:03 +08:00
046749566d update sql of unit testing case for package gdb 2021-07-08 23:06:58 +08:00
3b1b8a8306 Merge branch 'master' of https://github.com/gogf/gf 2021-07-08 22:44:29 +08:00
5e92747737 fix issue #1291 2021-07-08 22:44:16 +08:00
82ad7e2acc add more unit testing case for package gdb 2021-07-08 22:08:45 +08:00
2d319d0856 update sql of unit testing cases for package gdb 2021-07-08 21:46:21 +08:00
c060904f3f Merge pull request #1328 from lgyaxx/patch-1
Update gdb_model_fields.go
2021-07-08 21:18:42 +08:00
a63c4b6441 add more unit testing case for package gdb 2021-07-08 21:06:49 +08:00
9df860a202 fix issue #1292 2021-07-08 21:02:36 +08:00
2a1634fd6f Update gdb_model_fields.go
annotation typo fix
2021-07-08 15:42:51 +08:00
2970864158 fix issue #1240 2021-07-06 21:18:26 +08:00
8e76d7a8ed improve function TableFileds for gussing table name from table string;add overwrote function DoInsert for mssql/pgsql/oracle/sqlite for unsupported features 2021-07-06 20:59:09 +08:00
50e5dd5bd0 fix issue in fields filtering for table name with as statement 2021-07-06 13:14:33 +08:00
7e2605188d improve session variable map in template parsing 2021-07-06 09:58:25 +08:00
e5ae1cb85c improve session variable map in template parsing 2021-07-06 09:53:35 +08:00
1e78734f2c remove gf cli from basic framework 2021-06-30 20:43:49 +08:00
d5fad88c56 gf cli updates 2021-06-30 20:16:49 +08:00
35a81b868f gf cli updates 2021-06-30 20:08:25 +08:00
84355c1ddd gf cli updates 2021-06-30 20:07:46 +08:00
012121ea77 gf cli updates 2021-06-30 20:00:50 +08:00
1e628b9edb move command tool from repo gf-cli to sub folder 2021-06-30 00:15:52 +08:00
bfdeb6c4f5 log color兼容win环境 2021-06-29 21:05:46 +08:00
c42a9d6e50 Merge pull request #1316 from qinyuguang/otel
Otel
2021-06-29 13:05:38 +08:00
083e32fd9e otel version bump to v1.0.0-RC1 2021-06-28 13:36:37 +08:00
2a350fd3ab merge develop 2021-06-28 13:15:40 +08:00
03928f1977 add logging level prefix with color or not config 2021-06-28 00:58:35 +08:00
a2771c7558 format code 2021-06-28 00:23:25 +08:00
968e1db94d add log level prefix color 2021-06-28 00:00:44 +08:00
bb0a3e09d6 revert gerror usage for package gvalid 2021-06-26 18:44:59 +08:00
d109706ad3 unify error package to gerror 2021-06-26 18:34:26 +08:00
b958689264 add CtxStrict feature for package gdb 2021-06-26 18:20:55 +08:00
859ea150ed rename constants of package gpage from skake to upper camel case 2021-06-26 17:00:32 +08:00
91ca79b300 add context for intlog 2021-06-26 16:51:26 +08:00
8210f40469 improve Record/Result converting for package gdb 2021-06-26 16:46:36 +08:00
50ffaef33f add context for intlog/gsession;improve struct/structs converting for package gconv 2021-06-26 16:23:54 +08:00
c25f88293b unify command or enviroment key names for packages 2021-06-26 12:08:18 +08:00
025cdd66c5 improve details for package glog 2021-06-26 11:25:54 +08:00
237f172ae5 add file configuration support for logger in ghttp.Server 2021-06-26 11:18:44 +08:00
4cd7e4e5a0 version updates 2021-06-23 21:57:13 +08:00
e6688b9e86 add more unit testing cases for package ghttp 2021-06-23 21:39:12 +08:00
65131c6f22 add automatic fields mapping and filtering for Model.Where statements 2021-06-23 12:04:16 +08:00
7667aca4c2 improve Order feature for package gdb 2021-06-23 09:42:10 +08:00
816791b9c1 improve function Increment/Decrement for package gdb 2021-06-23 09:34:53 +08:00
d6ea2220f7 add auto fields filtering feature for function Scan of package gdb; mark funtcion Struct/Structs deprecated for gdb.Model 2021-06-22 21:48:56 +08:00
69dd5db774 improve record converting for package gdb 2021-06-22 20:05:37 +08:00
adca9222ab improve transaction feature for package gdb 2021-06-22 17:42:31 +08:00
7144aa6999 improve caller path filtering for package gdebug 2021-06-22 15:34:26 +08:00
fbad5f60eb improve caller path filtering for package gdebug 2021-06-22 15:09:08 +08:00
266f592739 improve raw sql count statement for package gdb 2021-06-21 19:21:38 +08:00
7c8bbcb3af version update 2021-06-21 09:38:19 +08:00
ba18e2bf6b comment update 2021-06-21 09:37:12 +08:00
5fefe97b87 add Raw Model for package gdb 2021-06-18 15:27:49 +08:00
5fba250a14 add Raw Model for package gdb 2021-06-18 15:20:27 +08:00
2606ad83ac add OnDuplicate/OnDuplicateEx feature for package gdb 2021-06-16 21:51:44 +08:00
d450de8e0d add OnDuplicate/OnDuplicateEx feature for package gdb 2021-06-16 21:44:31 +08:00
e4b0de0d4f Merge branch 'master' of https://github.com/gogf/gf 2021-06-15 19:58:10 +08:00
2af4fd86cc rename configuration node name from LinkInfo to Link 2021-06-15 19:57:55 +08:00
ddd171bc18 Merge pull request #1284 from qinyuguang/gutil
add gutil.SliceToMapWithColumnAsKey
2021-06-11 09:52:30 +08:00
5ef4ef61f0 Merge pull request #1280 from imloama/develop 2021-06-11 09:50:17 +08:00
2679f92aa8 comment update for package gerror 2021-06-10 20:45:22 +08:00
cca438d77f fix issue #1209 2021-06-10 20:17:53 +08:00
f2bc29e5c1 add gutil.SliceToMapWithColumnAsKey 2021-06-09 18:49:49 +08:00
fe7209e76d rename HandleSqlBeforeCommit to DoCommit for package gdb 2021-06-08 21:55:55 +08:00
7c4a0453b7 improve handler feature for package glog 2021-06-08 21:35:54 +08:00
97879834bc remove deprecated functions for package gdb 2021-06-08 21:28:41 +08:00
332535901f Merge branch 'master' of https://github.com/gogf/gf 2021-06-08 20:32:52 +08:00
e68e7a3224 remove Batch*/DoBatchInsert functions for package gdb 2021-06-08 20:32:34 +08:00
b935a8c652 fix merge conflicts for gdb_driver_pgsql 2021-06-08 09:20:22 +08:00
65befd5ac4 Merge pull request #1276 from qinyuguang/gdb_config_timezone
add timezone configuration for package gdb
2021-06-07 20:01:06 +08:00
78bdb5ef71 Merge pull request #1277 from weicut/master
Fixed incorrect type conversion
2021-06-07 19:58:27 +08:00
6eb7261dfd add timezone configuration for package gdb, effective for mysql and pgsql 2021-06-07 13:45:40 +08:00
4f82be5bc0 Fixed incorrect type conversion 2021-06-07 10:17:23 +08:00
3ac5772059 add UNION/UNION ALL feature for package gdb 2021-06-06 23:06:39 +08:00
eb723e47c2 fix issue in gconv.MapDeep 2021-06-05 08:58:54 +08:00
8aa7f08350 improve DB interface for package gdb 2021-06-04 09:54:19 +08:00
a54559d016 add WhereLT/WhereLTE/WhereGT/WhereGTE/WhereOrLT/WhereOrLTE/WhereOrGT/WhereOrGTE functions for gdb.Model 2021-06-04 09:27:41 +08:00
8e1f6abac5 change github.com/go-sql-driver/mysql to github.com/gogf/mysql 2021-06-03 15:38:33 +08:00
7f3a2207a3 Merge branch 'master' of https://github.com/gogf/gf 2021-06-02 21:12:52 +08:00
742c7913ea fix issue in function Parse for package ghttp 2021-06-02 21:12:27 +08:00
2d8ab726e2 Merge pull request #1265 from weicut/master 2021-06-02 13:11:59 +08:00
702a296258 improve handler feature for package glog 2021-06-02 09:53:08 +08:00
c3c5414ce2 add custom handler feature 2021-06-02 09:42:27 +08:00
ee3d375532 补充浮点数单元测试 2021-06-02 09:18:52 +08:00
e3f5c9175c 补充浮点数单元测试 2021-06-02 09:17:50 +08:00
7c24449a24 Merge branch 'master' of github.com:gogf/gf 2021-06-02 09:08:45 +08:00
1c09846d3e fix issue #1272 2021-06-01 20:09:52 +08:00
db94346863 gitee/github template update 2021-06-01 19:59:57 +08:00
3e6b9864d5 fix issue #1256 2021-06-01 19:47:02 +08:00
392c81ad69 remove Link parameter from function TableFields for package gdb 2021-05-29 17:26:08 +08:00
fe142c93fd add function Transaction for gdb.Model 2021-05-29 17:07:49 +08:00
578e7d634b comment updates for package gvalid 2021-05-29 16:47:39 +08:00
6659a49869 Merge branch 'master' of https://github.com/gogf/gf 2021-05-29 16:45:19 +08:00
d9bc8b05e1 add example for package gvalid 2021-05-29 16:45:08 +08:00
571405597b Merge pull request #1271 from wangle201210/master
add valid size method
2021-05-29 16:16:21 +08:00
1441ce7f5f add examples for package gproc 2021-05-29 15:47:07 +08:00
071a587755 Merge remote-tracking branch 'upstream/master' 2021-05-29 12:35:56 +08:00
c1db01425e fix remarks 2021-05-29 12:25:50 +08:00
7bfd48e2ab valid field length 2021-05-29 12:15:37 +08:00
e80309af32 Merge branch 'master' of https://github.com/gogf/gf 2021-05-29 11:30:47 +08:00
fa1814ff54 add custom rule fucntions feature for package gvalid 2021-05-29 11:30:34 +08:00
d7b8a2684a Revert ""gvalid length" compatible with only one parameter"
This reverts commit b2d3c7d1fd.
2021-05-29 11:28:26 +08:00
8559cd299d Merge pull request #1268 from wangle201210/master
"gvalid  length" compatible with only one parameter
2021-05-28 13:44:36 +08:00
b2d3c7d1fd "gvalid length" compatible with only one parameter 2021-05-28 11:34:51 +08:00
5100e0e8b7 add sub-query feature for orm 2021-05-27 22:18:16 +08:00
8acb921ee3 improve package gtimer for times limitation 2021-05-27 13:10:10 +08:00
9ee0f04e58 add command feature for package gcmd 2021-05-26 22:08:13 +08:00
fc88001a8c revert name from Job to Entry for package gtimer/gcron 2021-05-26 09:55:33 +08:00
fab6c4048d comment update 2021-05-25 22:16:55 +08:00
7b32791006 修复浮点型排序
原因:
返回值,强制转成 int 类型,会导致浮点型比较不准确,例如:0.33,转成 int 类型时,会变成 0
2021-05-25 16:15:02 +08:00
aa04948319 修复浮点型排序
原因:
返回值,强制转成 int 类型,会导致浮点型比较不准确,例如:0.33,转成 int 类型时,会变成 0
2021-05-25 16:10:52 +08:00
5903eb8ceb fix issue #1254 2021-05-25 09:56:23 +08:00
211e62a8e7 add timestamptz type support for pgsql for package gdb 2021-05-24 13:30:04 +08:00
64a9b06e64 comment update 2021-05-23 00:02:49 +08:00
6d81aa4462 infract internal link 2021-05-21 15:38:56 +08:00
406b6bf410 infract internal link 2021-05-21 15:30:21 +08:00
4e41d8aff8 improve context and nested transaction feature for package gdb 2021-05-21 13:25:53 +08:00
017c6e4e1f add example for i18n feature of package gvalid 2021-05-19 23:17:13 +08:00
7d3233c7ad add context for custom validation rule function;add function WhereNot for gdb.Model 2021-05-19 22:33:50 +08:00
3e2662582c improve nested transaction feature for package gdb 2021-05-19 21:17:21 +08:00
c94dee8191 improve nested transaction feature for package gdb 2021-05-19 21:11:51 +08:00
ab2ef13d99 improve transaction for package gdb 2021-05-19 20:33:19 +08:00
fac9ab5c01 improve package gvalid 2021-05-19 19:00:34 +08:00
420e0b9ca4 improve package gvalid 2021-05-19 13:29:40 +08:00
ea0340db8e improve validation manager feature for package gvalid 2021-05-19 09:25:49 +08:00
0bd1ea07a7 example update 2021-05-18 20:52:39 +08:00
c8c28770fb change Error from struct to interface for package gvalid;error string update for package gdb 2021-05-18 20:51:31 +08:00
0dfd968824 comment update for package gconv/gproc 2021-05-17 21:26:39 +08:00
b84ca9cc13 debug 2021-05-17 20:25:00 +08:00
e5734425ba debug 2021-05-17 20:18:21 +08:00
2274a10cfd fx issue #1250 2021-05-17 19:59:34 +08:00
302e234bfe comment update for package gfsnotify 2021-05-17 19:17:04 +08:00
2b942bf06b Merge pull request #1247 from notnear/master
add websocket client
2021-05-17 13:52:39 +08:00
522f6cb455 fix issue of failing in folder watching with no recursive option for package gfsnotify 2021-05-17 13:43:36 +08:00
a757fbd37d improve package gcfg 2021-05-17 00:07:06 +08:00
33567ef338 remove unit testing file for package internal/json 2021-05-15 23:42:39 +08:00
b2a15c259e improve unit testing case for package internal/json 2021-05-15 23:21:38 +08:00
d12409b118 revert json.UnmarshalUseNumber to json.Unmarshal for code in the example folder 2021-05-15 23:13:31 +08:00
8aed1eca13 version updates 2021-05-15 23:02:44 +08:00
f389688caa add unit testing cases for package internal/json 2021-05-15 23:02:21 +08:00
7003c284d0 replace json.Unmarshal with json.UnmarshalUseNumber for packages 2021-05-15 22:38:07 +08:00
facb2949c3 improve unit testing cases for package gtimer 2021-05-15 18:31:46 +08:00
1b1355a595 improve package gtimer 2021-05-15 18:27:46 +08:00
d76e4c8aed refract package gtimer for more stable 2021-05-15 18:13:51 +08:00
cc1224e032 add context for package gvalid.Check* functions 2021-05-13 20:56:52 +08:00
tom
09de115670 add websocket client 2021-05-13 17:51:06 +08:00
23110b5d19 fix issue in unit testing case of package gins 2021-05-13 08:53:54 +08:00
a326f4a989 improve package gi18n/gview/gvalid for more flexable i18n feature controll,add custom error configuration and i18n translation for custom error message 2021-05-13 00:16:45 +08:00
d21b9d58e1 improve with feature by supporting attributes struct which also have 'with' tag 2021-05-12 21:34:15 +08:00
9d362c3738 merge feature/improve_struct_validation 2021-05-12 00:15:53 +08:00
b06580d343 improve struct validation for package gvalid 2021-05-12 00:01:52 +08:00
a4240bdfb7 improve struct validation for package gvalid 2021-05-11 20:57:30 +08:00
1eab1cb367 add more unit testing cases,remove function Filter usage in unit testing cases for package gdb 2021-05-11 20:14:06 +08:00
2e38416e12 improve struct embedded association case of with feature for package gdb 2021-05-11 20:00:50 +08:00
034a3f1808 improve struct validation 2021-05-11 19:20:39 +08:00
531519e8f2 Merge pull request #8 from gogf/master
mr from master
2021-05-07 09:53:15 +08:00
6a80091fef version updates 2021-05-03 00:00:29 +08:00
742653ce75 improve Model function for struct parameter that can retrieve table name tag from 2021-05-02 23:28:24 +08:00
a8c3d07d9f improve with feature for package gdb 2021-05-02 22:35:47 +08:00
df1ef5db78 add example for package gdb 2021-05-02 17:57:00 +08:00
4b15ab5e99 improve OrderRandom function for package gdb 2021-05-02 16:42:34 +08:00
cdc97e9b2b improve logging for transaction feature for package gdb 2021-05-02 15:58:28 +08:00
bd84b97614 add more Where*/Min/Max/Avg/Sum/CountColumn/Increment/Decrement/OrderAsc/OrderDesc/OrderRandom functions and associated unit testing cases for package gdb 2021-05-02 12:17:06 +08:00
d7eb1cca07 add nested transaction feature for package gdb 2021-05-02 09:35:54 +08:00
5856f74d83 up 2021-05-02 08:10:35 +08:00
563509c4a6 route map dumping updates 2021-05-01 09:04:16 +08:00
max
f3983cd6b7 feat: pg查询表字段时获取字段描述信息 2021-04-28 14:51:40 +08:00
d0753fa527 Merge branch 'develop' 2021-04-26 20:38:16 +08:00
524e3bedc7 improve empty value validation for required-with* patterns for package gvalid 2021-04-26 20:37:36 +08:00
30b60754e3 README update 2021-04-16 10:32:55 +08:00
88c49dc2cb README update 2021-04-16 10:27:39 +08:00
bb3dcc2622 Merge branch 'master' of https://github.com/gogf/gf 2021-04-16 10:22:02 +08:00
5cca0640d9 README update 2021-04-16 10:21:42 +08:00
fb48ceeeee Merge pull request #1214 from ansionfor/add-graceful-timeout
add graceful reload timeout config
2021-04-10 08:23:54 +08:00
90f4bba8fd gofmt格式化 2021-04-07 20:52:38 +08:00
802187abc4 add graceful reload timeout 2021-04-07 16:06:37 +08:00
49dd17c047 remove maxIdleTime feature due to be compatible with old Golang version <= v1.14 2021-04-04 12:13:51 +08:00
a3b94c24de fix issue #854; add maxIdleTime configuration and comments update for package gdb; version updates 2021-04-04 12:01:22 +08:00
ac4485dc84 comment update for package gsession 2021-04-02 18:00:50 +08:00
4d1e25cdab change internal constant varibale names for package gqueue 2021-04-02 16:16:54 +08:00
ec00e99477 comments update for package gtime 2021-04-01 09:41:14 +08:00
a73dca3e50 Merge pull request #1196 from yanllllk/yys 2021-04-01 09:27:59 +08:00
yys
ed71d2b2ac add test 2021-03-31 14:07:28 +08:00
3911c2e0a2 README updates 2021-03-30 18:00:44 +08:00
1b6765db50 README updates 2021-03-30 17:44:57 +08:00
345fb69521 README updates 2021-03-30 17:43:44 +08:00
83a6abc70f README updates 2021-03-30 17:42:00 +08:00
cfef726205 README updates 2021-03-30 17:41:10 +08:00
de0f9e728c README updates 2021-03-30 17:39:56 +08:00
d9754a532b version updates 2021-03-30 17:20:13 +08:00
dc51023c61 upgrade github.com/olekukonko/tablewriter from 0.0.1 to 0.0.5 2021-03-30 16:54:52 +08:00
87ce5c5419 Merge branch 'master' of https://github.com/gogf/gf 2021-03-30 16:48:19 +08:00
c4fc9f9618 fix issue #1204: improve validation support for time value, eg: gtime.Time/*gtime.Time, time.Time/*time.Time. 2021-03-30 16:06:20 +08:00
8d7aa5db83 Merge pull request #1205 from Zh1Cheung/master
bug:The parameter of the New method is a pointer
2021-03-30 15:39:31 +08:00
9c70fe3be8 add more unit testing case for package gvalid 2021-03-30 15:25:26 +08:00
78027d2ec6 deprecated comments update 2021-03-30 13:43:08 +08:00
d4e4b9addf improve package gcfg for automatically checking and adding path of package main 2021-03-29 18:05:47 +08:00
b2acd22f58 improve package gi18n 2021-03-29 17:36:51 +08:00
ae5ecb5bfa update unit testing case for package gtrace 2021-03-29 16:12:14 +08:00
6f1340ce36 upgrade otel from v0.18.0 to v0.19.0 2021-03-29 16:00:56 +08:00
473fdba14f add replace in go.mod for otel 2021-03-29 15:51:03 +08:00
93a01a1aaf bug:The parameter of the New method is a pointer 2021-03-27 16:21:28 +08:00
yys
7c51ff4707 gtime 修改 2021-03-25 13:38:59 +08:00
bb6883213f fix issue #1202 2021-03-24 22:04:04 +08:00
54395b39a6 fix issue #1202 2021-03-24 21:19:23 +08:00
6deb817fd0 fix issue in unit testing case for package gpage 2021-03-23 17:58:09 +08:00
482e093331 add map/[]map converting support for gconv.Scan;improve gconv.MaptoMaps 2021-03-23 17:53:20 +08:00
042f903157 Merge branch 'master' of https://github.com/gogf/gf 2021-03-23 14:23:47 +08:00
c423ad4830 fix issue in gfile.MainPkgPath;improve fields filter for package gdb 2021-03-23 14:21:54 +08:00
958b109a12 fix removing cookie issue 2021-03-19 19:16:21 +08:00
113fffdd69 Merge pull request #1199 from yangyanqing/yangyanqing/fix-zte-chinese 2021-03-19 17:08:31 +08:00
4aaf09fded improve gfile.MainPkgPath 2021-03-19 16:35:55 +08:00
2f3df76f37 fix issue #1190 2021-03-19 15:37:33 +08:00
cf7706b16d ZTE 的中文名应该是“中兴通讯”,不是“中兴科技” 2021-03-19 11:45:17 +08:00
36963c05a2 fix issue #1190 2021-03-19 11:35:12 +08:00
48d840a1b8 ad go.sum 2021-03-18 15:29:42 +08:00
e3ebc908bb improve package gconv 2021-03-18 15:21:05 +08:00
9ed8d8c113 rename max content log size name for gtrace from maxlogsize to maxcontentlogsize 2021-03-18 11:22:44 +08:00
9eab5daf19 update required minimum go version from 1.11 to 1.14 2021-03-18 11:19:36 +08:00
6a24b595f0 upgrade otel from 0.16.0 to 0.18.0 2021-03-18 10:39:23 +08:00
150f237f13 fix issue in incorrect parameter sequence in package gi18n;improve package gcfg for detailed error printing 2021-03-16 14:39:01 +08:00
yys
17233084f1 为gtime添加scanner和valuer 2021-03-13 14:07:22 +08:00
41f2138b39 fix issue of overflow in grand.D 2021-03-11 23:29:39 +08:00
6376b8aaa6 remove session storage file removing feature for package gsession 2021-03-11 21:21:47 +08:00
58362ad143 add grand.D for random time.Duration;add checking and removing session files for package gsession 2021-03-11 20:05:08 +08:00
d72d23c2eb change browser mode from boolean markable variable to cookiejar for ghttp.Client 2021-03-11 18:58:13 +08:00
7702c5bfde add internal logging for package gdb/gredis 2021-03-11 11:39:49 +08:00
20f2a6c003 add recursive validation feature of struct attribute for package gvalid for #1165 2021-03-10 23:28:34 +08:00
0d4c1c47d5 improve package grand 2021-03-10 21:19:11 +08:00
4d32733790 improve ghttp.Client for #1179 2021-03-09 22:54:38 +08:00
0e58b6e95b README updates 2021-03-08 23:27:48 +08:00
19bfc48dca version updates 2021-03-04 22:49:11 +08:00
ae0cc5a4b6 add more unit testing case for ScanList feature 2021-03-04 20:45:05 +08:00
ba74e0beb2 improve ScanList of the same replation names for package gdb 2021-03-04 00:07:06 +08:00
e5ca4e788e fix issue #1190 2021-03-03 14:29:01 +08:00
1c7f034135 Merge branch 'master' of https://github.com/gogf/gf 2021-03-02 23:32:50 +08:00
4c78ce6e3f fix issue #1187 2021-03-02 23:27:50 +08:00
7803d557b3 Merge pull request #1183 from rc452860/master 2021-03-02 00:04:05 +08:00
204fea395c add struct object support in group router registering for package ghttp 2021-03-01 20:49:09 +08:00
bd13de2b39 improve package internal/intlog 2021-03-01 17:50:02 +08:00
d0f649b328 improve package internal/intlog 2021-03-01 17:39:13 +08:00
04e42d2175 improve package internal/intlog 2021-03-01 17:15:18 +08:00
ffc88eaaa7 improve package gcfg for main package path searching 2021-03-01 17:05:44 +08:00
4b4cc5ebb9 improve package gcfg for main package path searching 2021-03-01 17:02:07 +08:00
0e6cddb547 去除cancelFunc避免退出之前关闭mysqlConn导致数据获取不完整 2021-03-01 01:43:53 +08:00
a69aec9070 Merge branch 'master' of https://github.com/gogf/gf 2021-02-28 20:14:10 +08:00
d2bd37962e add unit testing case of UnmarshalValue for struct converting of querying result; improve package gdb 2021-02-27 23:58:36 +08:00
eb6763b0fd fix issue of failing configuration for default configuration file for package gcfg 2021-02-26 13:57:47 +08:00
d330afdd36 add required* rules checks for map/slice 2021-02-24 01:20:06 +08:00
5db4bbc186 fix issue 1162 2021-02-24 01:07:09 +08:00
e00f2666ff Merge pull request #1176 from develop1024/master 2021-02-24 00:39:35 +08:00
0238cdd5ec 修改注释错误-os/gbuild/GetVar 2021-02-23 23:07:28 +08:00
2c34d96b9d add tls configuration for ghttp.Client 2021-02-23 22:00:11 +08:00
65b3630f6d Merge pull request #1174 from aimingo/master
style:  code style
2021-02-22 11:41:45 +08:00
54b629561e style: code style 2021-02-22 11:20:10 +08:00
285ad36e7d add short datetime string parsing support for package gtime 2021-02-21 22:24:51 +08:00
5adde275fc add switch variable for internal type tracing components 2021-02-14 22:00:56 +08:00
a3fa10d820 great! completed 'with' feature for package gdb 2021-02-09 18:00:43 +08:00
acf47f3907 orm with feature 2021-02-08 17:57:21 +08:00
b4d5335e43 add package gmeta for embedded struct of meta data feature 2021-02-07 21:23:09 +08:00
39fb842e9b Merge branch 'master' into feature/ormwith 2021-02-07 15:34:50 +08:00
7a5d86b44d README updates 2021-02-07 15:34:36 +08:00
397e11e124 improve package gdb for association feature 2021-02-07 14:39:32 +08:00
f4314c318e up 2021-02-07 10:40:02 +08:00
9bb5536163 Merge branch 'master' of https://github.com/gogf/gf into develop 2021-02-07 10:32:18 +08:00
2344701f22 README updates 2021-02-07 10:31:59 +08:00
3bb909ba4f improve comment for package gspath 2021-02-06 11:42:58 +08:00
8ae0bd148b improve ScanList for package gdb; improve Structs for package gconv 2021-02-05 17:42:05 +08:00
72251b880a improve package gconv for slice converting 2021-02-05 14:44:20 +08:00
fefde4c290 improve stack feature for package gdebug/gerror 2021-02-04 00:10:13 +08:00
3b2bae6128 improve soft deletion for package gdb 2021-02-03 23:11:17 +08:00
ae559b57de fix dryrun configuration for package gdb 2021-02-03 22:46:59 +08:00
6135085d61 improve package gtrace 2021-02-03 15:27:41 +08:00
40bdc76af1 improve package gtrace 2021-02-03 15:14:07 +08:00
d4f982a9cf Merge branch 'master' of https://github.com/gogf/gf 2021-02-02 15:18:37 +08:00
813841bb68 rename GetWithEnv to GetOptWithEnv for packge gcmd 2021-02-02 15:16:09 +08:00
930e63e6b9 Merge pull request #1154 from gouguoyin/master
formatMonthDaySuffixMap() misjudged suffix
2021-02-02 13:16:17 +08:00
ce40d139e7 fix issue of nil response handling for ghttp.Client 2021-02-01 21:51:42 +08:00
8368e11827 merge develop 2021-02-01 17:14:08 +08:00
e6b4662ec2 improve tracing feature 2021-02-01 17:10:50 +08:00
28f83d3d32 formatMonthDaySuffixMap() misjudged suffix
when day is 21,abbreviated as 21st,suffix is st ,is not th
when day is 22,abbreviated as 22nd,suffix is nd ,is not th
when day is 23,abbreviated as 23rd,suffix is rd ,is not th
when day is 31,abbreviated as 31st,suffix is st ,is not th
2021-01-31 15:40:27 +08:00
3e33d66ab4 fix issue https://github.com/gogf/gf/issues/1148 2021-01-30 23:05:02 +08:00
13248d6736 Merge pull request #1149 from tangjoin/master
Update client_request.go
2021-01-30 22:57:14 +08:00
8bd24724e7 Update client_request.go 2021-01-30 22:10:06 +08:00
80248e9a6e improve tracing 2021-01-28 14:09:13 +08:00
2734903886 tracing baggage 2021-01-28 13:51:23 +08:00
2451b40d3e improve package gtrace 2021-01-28 13:11:09 +08:00
9fb6227461 fix issue in signal handler for windows 2021-01-28 10:08:52 +08:00
a2b322a31b improve gtime.ParseTimeFromContent 2021-01-27 23:37:04 +08:00
69e1628a0d improve unit testing case for package gtimer 2021-01-27 23:08:43 +08:00
6307af1096 travis updates 2021-01-27 21:02:39 +08:00
6e4e1abf1e improve tracing by adding constants for attribute and event names 2021-01-27 20:25:57 +08:00
2c15aad0e7 add common tracing labels 2021-01-27 19:50:32 +08:00
152c472bc2 add common tracing labels 2021-01-27 19:24:04 +08:00
8f6f17c341 add common tracing labels 2021-01-27 19:15:14 +08:00
f2fe084988 improve tracing feature 2021-01-27 13:28:12 +08:00
f5ba665c59 improve package gcfg 2021-01-27 00:55:45 +08:00
9cc5d7a691 improve package gdebug/gfile 2021-01-27 00:20:23 +08:00
94adc50487 version updates 2021-01-26 21:20:06 +08:00
1c93c2b000 merge develop 2021-01-26 21:19:43 +08:00
6bad31f1be move tracing examples to new repo. 2021-01-26 20:07:40 +08:00
24e2c7926e go mod tidy 2021-01-26 16:53:39 +08:00
e3be3bac92 add tracing example for grpc 2021-01-26 16:50:16 +08:00
c72c7dbe9a improve tracing feature 2021-01-26 16:06:20 +08:00
52c17dfce0 add example for tracing feature 2021-01-26 14:33:35 +08:00
c01b520ba6 improve package gcache 2021-01-26 14:11:36 +08:00
796774efe4 improve package gcache 2021-01-26 13:33:24 +08:00
0baa52afee improve statement features for package gdb 2021-01-26 11:09:50 +08:00
4c6d9f5eff improve tracing feture for package glog/gdb/gredis 2021-01-26 01:19:55 +08:00
99dd889ff0 add tracing feature for package gredis 2021-01-25 21:59:44 +08:00
b89d8d2740 add tracing feature for package gdb 2021-01-25 21:17:32 +08:00
cc1e340585 add tracing middleware for ghttp.Client/Server; add package gtrace 2021-01-25 18:43:47 +08:00
3f2ae3ba62 add tracing feature for ghttp.Client 2021-01-25 14:54:38 +08:00
e622ece861 merge develop 2021-01-25 10:23:46 +08:00
9f2e69a9e6 improve model relation feature for package gdb 2021-01-25 00:04:01 +08:00
9b02f5220a imprive uint testing case for package gtimer 2021-01-24 22:33:47 +08:00
2dd2144dcd improve unit testing case for package gdb/gcron 2021-01-24 21:52:34 +08:00
a5f53f158a improve unit testing case for package gcron; improve package gdb; 2021-01-23 01:01:24 +08:00
2c7a257b5a remove parseTime parameter for mysql driver for package gdb 2021-01-22 23:49:17 +08:00
f579c724c6 fix issue in batch number for package gdb 2021-01-22 23:21:29 +08:00
ab9d7ed509 improve package gcron 2021-01-22 23:09:42 +08:00
9524263803 improve unit testing cases for package gcron 2021-01-22 23:07:11 +08:00
c27ddb1d79 opentelemetry 2021-01-22 23:04:29 +08:00
ce640048b8 improve package gcfg 2021-01-22 15:30:39 +08:00
e222d92fb5 improve unit testing case for package gcron 2021-01-22 15:19:11 +08:00
f1ed9b31b6 add g.Listen for automatic signal handling feature 2021-01-22 12:57:21 +08:00
da0669c739 improve middleware feature for ghttp.Client 2021-01-22 01:06:44 +08:00
5679972d8d Merge pull request #1130 from eyasliu/develop-ghttp-middleware
New feature: ghttp client middleware
2021-01-22 00:36:57 +08:00
0aca2f0501 fix issue in package g; improve package ghttp 2021-01-22 00:36:28 +08:00
0fb32b63e7 add signal handler feature for package gproc; improve package ghttp/g for signal listening feature 2021-01-21 21:14:17 +08:00
b38a4610eb improve unit testing case for package gtimer 2021-01-20 14:19:14 +08:00
59285709a6 fix issue in filds filter in join statements for package gdb 2021-01-20 13:09:59 +08:00
a304ca8f5b improve unit testing case for package gcron 2021-01-20 00:18:29 +08:00
333e5b27aa add more unit testing case for package gdb 2021-01-19 21:08:01 +08:00
5f4293a803 make unnecessaryly exported resource private for package ghttp 2021-01-19 19:33:21 +08:00
fe80881ec9 improve package ghttp 2021-01-19 19:18:39 +08:00
e1418a2caa fix blocking issue in roration feature for package glog 2021-01-19 16:44:37 +08:00
68247acab1 improve package gjson/gvar 2021-01-19 14:26:17 +08:00
6d05512c2f improve unit testing case for package gtimer 2021-01-19 12:35:10 +08:00
bf6d6a29c0 improve package gtmer 2021-01-19 11:27:23 +08:00
353286fd84 fix issue in gtimer 2021-01-19 10:40:07 +08:00
c801df497f fix issue in package gtimer 2021-01-19 00:12:22 +08:00
93a648ba15 fixing gtimer 2021-01-18 21:20:10 +08:00
826b9b1b1f fix issue in struct converting for package ghttp 2021-01-18 09:22:46 +08:00
e661b160d8 const name renaming 2021-01-17 22:10:45 +08:00
8b6d00b193 improve package gconv 2021-01-17 22:06:07 +08:00
093034acd1 copyright comment update 2021-01-17 21:46:25 +08:00
6f968a125e improve time converting for package gconv 2021-01-17 21:39:17 +08:00
5c9cee7fb9 improve package gconv 2021-01-17 20:56:38 +08:00
7676837337 fix abort test 2021-01-17 18:05:29 +08:00
c5145dc4f6 remove abort, actually the abort is unuse 2021-01-17 17:26:53 +08:00
91e29e23a4 improve package gcfg for searching priority 2021-01-16 22:31:48 +08:00
1e309e570d Merge branch 'master' into develop 2021-01-16 20:42:44 +08:00
8362322d63 Merge pull request #1129 from eyasliu/develop-ghttp-wrap-std-handler
add util: WrapF and WrapH to transform net/http handler to ghttp.HandlerFunc
2021-01-16 20:41:57 +08:00
aefa54f04b improve package gredis 2021-01-16 20:37:59 +08:00
2c5e6b379f improve package gres 2021-01-16 20:20:30 +08:00
c20f3f0595 add Wrapf and WrapH to transform net/http.HandlerFunc and net/http.Handler to ghttp.HandlerFunc 2021-01-16 17:53:26 +08:00
5b17108f71 trigger CI 2021-01-15 18:43:28 +08:00
1fee3eb5f0 fix review change 2021-01-15 13:58:16 +08:00
bc4d84b60f improve comment for package gtime 2021-01-14 00:27:01 +08:00
6a67dceca7 Merge pull request #1092 from tiansin/master
feat: 🎨 some time features.
2021-01-14 00:15:44 +08:00
9c8a68f742 add MarshalJSON for package gerror 2021-01-14 00:05:15 +08:00
2d67d31f90 improve benckmark for package grand 2021-01-13 23:38:10 +08:00
c1b52e0f35 add more unit testing cases for package gredis 2021-01-13 20:00:31 +08:00
55a7c01f73 feat: 🚑 Add function comment 2021-01-13 16:14:21 +08:00
6cf48f9479 improve package gstr 2021-01-13 10:56:17 +08:00
f9905f2bb5 gofmt code 2021-01-12 19:09:45 +08:00
c07c74bf1b fix lint 2021-01-12 19:01:33 +08:00
14536e9abc add http client middleware feature 2021-01-12 18:08:50 +08:00
73c68e48a1 improve package gvalid 2021-01-12 10:46:39 +08:00
a9aa021914 add json tag for configuration struct for package gdb/gredis/ghttp/glog/gview 2021-01-12 00:42:33 +08:00
2ae32ed2c2 add QueryTimeout/ExecTimeout/TranTimeout/PrepareTimeout for package gdb 2021-01-11 20:48:35 +08:00
8ee3793f8f add SessionCookieMaxAge configuration for ghttp.Server 2021-01-11 20:06:09 +08:00
6f5b0c393e add more unit testing case for package gdb 2021-01-11 19:30:22 +08:00
a4152347e5 improve comment for package ghttp 2021-01-10 23:37:20 +08:00
bb2dad6d5e improve package gdb of empty value handling for struct convertion 2021-01-09 23:02:16 +08:00
92b791eb08 improve Struct convertion for package gdb; improve IsNil function for package internal/empty 2021-01-09 21:05:47 +08:00
8365ce9d29 change name *Case to Case* for case functions of package gstr 2021-01-08 16:24:08 +08:00
e141b8e098 shutdown server gracefully when reveiving TERM signal 2021-01-08 00:58:58 +08:00
c7ce8cf943 fix issue in resource searching for package gcfg 2021-01-08 00:39:52 +08:00
788ade2db0 improve package gres 2021-01-07 19:34:46 +08:00
a9f332fdd6 version updates 2021-01-07 13:00:53 +08:00
c6f1ae9426 add file name configuration from command line or environment for package gcfg 2021-01-07 01:17:03 +08:00
b12c909fd6 add logging level configuration for package ghttp 2021-01-06 01:00:49 +08:00
1a62f22a5b Merge branch 'master' into develop 2021-01-06 00:39:54 +08:00
5c2574da7c improve package ghttp 2021-01-06 00:39:50 +08:00
9fbdb9712b improve package gtime 2021-01-04 19:50:44 +08:00
7bc42e6eaa improve Fields filtering for package gdb 2021-01-04 19:46:46 +08:00
b6b1bc8813 improve time converting for package gconv 2021-01-04 19:22:55 +08:00
a62d2589bc improve time zone feature for package gtime 2021-01-04 16:33:33 +08:00
e4069bdb93 improve package gtime 2021-01-04 15:46:51 +08:00
1e100ac0ec improve package gtime 2021-01-04 15:43:54 +08:00
9d865e4ac6 improve package gtime 2021-01-04 15:32:55 +08:00
b3b1418e11 improve packge gi18n 2021-01-04 14:43:17 +08:00
3ab32faccc improve package gins 2021-01-04 14:15:42 +08:00
2eb09efc81 fix issue of data race in unit testing case for package gtime 2021-01-04 14:03:22 +08:00
dd2dfbf58d fix issue of data race in unit testing case for package gtime 2021-01-04 13:50:23 +08:00
d549311210 fix issue in uint testing case for package gdb 2021-01-04 13:04:57 +08:00
8a91592839 fix issue in eq for package gview 2021-01-04 00:05:02 +08:00
4d962c5aa5 improve packge gdb for treat int8 as int64 for pgsql 2021-01-03 23:44:44 +08:00
d9bd3153ea improve time parsing for package gtime 2021-01-03 23:37:45 +08:00
4991e14dff improve error message when failed in Mkdir 2021-01-03 12:05:04 +08:00
5629020538 fix issue in incorrect datetime string argument for oracle 2021-01-02 21:06:51 +08:00
361742c4a0 fix issue in incorrect datetime string argument for oracle 2021-01-02 20:31:25 +08:00
4272ac16c7 README updates 2021-01-02 15:12:08 +08:00
6c08d5fd81 fix issue missing build-in variable Request for template parsing of ghttp.Response 2021-01-02 01:53:36 +08:00
2a9c20bfa2 README updates 2021-01-02 01:24:42 +08:00
8dab319a7f README updates 2021-01-02 00:51:53 +08:00
5d01c9fff3 version updates 2020-12-31 00:27:42 +08:00
020b6bde68 README updates 2020-12-30 16:42:50 +08:00
036bc03ebf improve error handling for package gconv 2020-12-30 13:27:27 +08:00
86e70ad55c improve package gerror 2020-12-30 13:18:43 +08:00
bdf23ef48f fix issue of error code lost in middleware handling for package ghttp 2020-12-30 12:56:24 +08:00
820befa1a0 improve insert function for package gdb 2020-12-29 20:30:29 +08:00
0d5b93bd07 fix issue in incorrect parsing error message for gview 2020-12-29 19:43:25 +08:00
dbafe01064 feat: 🎨 some time features. 2020-12-29 18:05:00 +08:00
51d9f7ff12 fix issue in configuration string parsing error when there're special chars(especially '?') in redis password 2020-12-29 16:49:15 +08:00
4beeeb92ac improve gerror.Stack 2020-12-29 14:28:26 +08:00
662f1ed6b7 add Query/Exec/Prepare back for gdb.Link 2020-12-29 14:01:49 +08:00
05703ec3d7 improve ghttp.RouterGroup.ALLMap 2020-12-29 13:39:40 +08:00
bfab4a4952 comment updates for package gdb 2020-12-29 13:30:15 +08:00
9d25e17fcb readme updates 2020-12-29 09:09:12 +08:00
4828ddcdd7 add example/unit testing cases for package gdb 2020-12-29 00:01:27 +08:00
d25a3909d1 improve context feature for package gdb 2020-12-28 23:03:13 +08:00
695d333d2f add example cases for package gerror 2020-12-28 14:59:49 +08:00
5f28adec36 add benchmark testing case for package gerror 2020-12-28 13:43:17 +08:00
799e8214f8 Merge remote-tracking branch 'upstream/master' 2020-12-28 11:06:38 +08:00
c893817e56 Merge branch 'master' of https://github.com/gogf/gf 2020-12-27 00:12:34 +08:00
65785db659 improve Model.Data for shallow value copy for value type of map/slice 2020-12-27 00:11:26 +08:00
85a7723b13 Merge pull request #1084 from tiansin/master
feat: 🐛 fix GetWhereConditionOfStruct where AND
2020-12-25 20:36:54 +08:00
ac827d3154 revert default interval from 100ms to 50ms 2020-12-25 20:31:09 +08:00
95b09aa5fe feat: 🐛 fix GetWhereConditionOfStruct where AND 2020-12-25 16:03:01 +08:00
4e79b90863 add gutil.SliceToMap 2020-12-25 15:34:54 +08:00
306c02bcd4 fix issue for gfile.ReadLinesBytes, and improve callback function definition for gfile.ReadLinesBytes/ReadLines 2020-12-25 11:37:47 +08:00
fc66a0715a comment updates for package internal/empty 2020-12-25 01:44:07 +08:00
9c7aecf0fd Merge pull request #1058 from viken2/master
improve function empty
2020-12-25 01:38:33 +08:00
9f5a51e854 fix Strings/String function for package gvalid, issue:1077 2020-12-23 21:13:47 +08:00
a7f19e9e45 README updates 2020-12-23 20:23:11 +08:00
9b5862b61f README updates 2020-12-23 13:28:12 +08:00
176533e1a5 README updates 2020-12-23 13:26:33 +08:00
c243637d44 improve gstr.TrimStr/TrimLeftStr/TrimRightStr 2020-12-20 22:02:14 +08:00
7c52a6f9f6 ass SetCtx for ghttp.Request 2020-12-18 22:57:08 +08:00
446f8e7110 comment update 2020-12-16 01:15:22 +08:00
7db1cfa898 add gutil.MapToSlice/StructToSlice 2020-12-16 00:50:42 +08:00
9a6aa01115 constant name changes; version update 2020-12-15 20:16:17 +08:00
4a88e0255d improve shutdown feature for ghttp.Server 2020-12-15 19:24:38 +08:00
edc56949b7 improve package glog for rotation feature 2020-12-15 13:03:12 +08:00
63bc06d0fe improve package gview 2020-12-15 00:09:55 +08:00
9b58b66172 fix issue of HAVING statement before ORDER BY 2020-12-14 23:34:23 +08:00
3517295e96 improve package gcdm 2020-12-14 23:00:22 +08:00
c685876e6f improve package gparser 2020-12-14 21:22:04 +08:00
cb2c9c43a8 rename constant names 2020-12-14 19:34:02 +08:00
751a567e84 add Is* functions for package gvar 2020-12-14 18:54:14 +08:00
0a99bb9a7d improve gconv.Interfaces 2020-12-14 16:56:41 +08:00
a2e7aec37f change constant variable names 2020-12-14 13:26:48 +08:00
102e2d07d9 improve package gcfg for automatic configuration file type checks; change const variables for package gcfg/glog/gtimer/gmode/gins/gi18n 2020-12-14 13:02:08 +08:00
5400d22bc2 improve function empty 2020-12-12 21:57:07 +08:00
8d3fd21be5 Merge pull request #1 from gogf/master
merge master
2020-12-12 13:15:30 +08:00
bb39ed136f Merge branch 'fix/json' 2020-12-12 01:42:56 +08:00
363f6eba44 remove automatic stack content printing for error that has stack infomation 2020-12-11 01:12:53 +08:00
0ca305a1bf improve package gerror 2020-12-11 01:08:15 +08:00
1d1e64b834 improve package gerror 2020-12-11 00:45:15 +08:00
688e327f15 improve unit testing case for package ghttp 2020-12-10 23:38:59 +08:00
8c7ec0e7d9 Merge branch 'master' of https://github.com/gogf/gf 2020-12-10 23:33:43 +08:00
84fef8dea3 add error code feature for package gerror 2020-12-10 23:33:24 +08:00
c1d2ad68b3 Merge pull request #1051 from dozysun/master
fix InsertIgnore didn't work
2020-12-10 20:17:43 +08:00
a577605726 improve package gtimer 2020-12-10 20:10:07 +08:00
71444736ae fix InsertIgnore didn't work
fix InsertIgnore didn't work
2020-12-10 14:40:58 +08:00
b7e41ec32c improve package gvalid 2020-12-09 21:00:30 +08:00
7fa09596b0 improve package gsession 2020-12-09 16:22:03 +08:00
7316e6648f change errors to gerror; update copyright in comment 2020-12-09 16:04:29 +08:00
e9d346ce4f improve package glog 2020-12-09 13:54:27 +08:00
4b91e709f7 Merge branch 'master' of https://github.com/gogf/gf into develop 2020-12-09 13:48:50 +08:00
7de89286da Merge pull request #1045 from prcseraph/master 2020-12-09 13:48:33 +08:00
569a953b43 inprove package gconv for empty string converting to number array 2020-12-09 13:39:09 +08:00
1e7f795c69 remove package github.com/json-iterator/go 2020-12-09 01:38:56 +08:00
d2ae383b83 improve unit testing case for package gdb 2020-12-09 01:33:02 +08:00
8978112433 add gdb.Raw for raw sql instead of prepare argument feature 2020-12-09 01:29:23 +08:00
117eaea720 add support for cert and key file reading from resource manager for ghttp.Server 2020-12-09 00:06:56 +08:00
278e85357d * 日志根据大小切片时,文件重命名读写冲突。 2020-12-08 18:54:42 +08:00
60ec59fa4a improve package gsession 2020-12-07 20:39:52 +08:00
0aa82ad020 improve package gpool 2020-12-07 18:57:40 +08:00
7bd319ddc7 Merge branch 'master' of https://github.com/gogf/gf into develop 2020-12-07 13:19:42 +08:00
7ceb667486 Merge pull request #1040 from Wlvs530/master
Not Callback ExpireFunc In Pool.Get()
2020-12-07 13:18:48 +08:00
80c4786afd Not Callback ExpireFunc In Pool.Get() 2020-12-05 13:21:18 +08:00
2f741d3b24 add genv.SetMap 2020-12-05 00:06:03 +08:00
d2b65f0f91 add gcmd.GetWithEnv/genv.GetWithCmd; remove package cmdenv; 2020-12-04 23:44:54 +08:00
c226782f23 improve package gcmd,internal/cmdenv 2020-12-04 23:29:20 +08:00
57a82ebcc0 improve gconv.Struct 2020-12-04 18:17:11 +08:00
416885a726 gdb driver example updates 2020-12-04 15:42:35 +08:00
9b4d2d9172 fix issue in unit testing case for package gjson/gparser 2020-12-04 15:41:26 +08:00
d4b2bf20bb gdb driver example updates 2020-12-04 15:37:14 +08:00
ce9a0555c5 improve gconv.Interfaces by adding support for type map as its parameter 2020-12-04 14:33:47 +08:00
5171250a9d improve gutil.Keys,gdb.Model.Fields,internal/structs 2020-12-04 14:22:50 +08:00
80b629916a fix issue in function Clone for package gmap/garray/gtree 2020-12-02 21:38:29 +08:00
ecaf0da228 improve package glog; add more unit testing case for package gmlock 2020-12-02 21:33:07 +08:00
8c0a905a9f improve package gconv for custom type converting 2020-12-01 15:57:06 +08:00
5a0326f666 fix issue in unit testing case for package gconv 2020-11-30 09:07:44 +08:00
790a651ac1 fix typo 2020-11-29 23:55:32 +08:00
6f93bd17f2 add context feature for package gdb 2020-11-29 23:54:38 +08:00
3419d66c4b add context feature for package gdb 2020-11-29 23:50:16 +08:00
cabf684ec9 add context feature for package gdb 2020-11-29 23:47:57 +08:00
2b6e6ce28e improve update counter feature for package gdb 2020-11-29 22:26:16 +08:00
32101189a2 Merge branch 'master' of https://github.com/gogf/gf into develop 2020-11-29 21:46:36 +08:00
600c081801 Merge pull request #1028 from arieslee/gdb-counter
add update counter method for package gdb.
2020-11-29 21:46:17 +08:00
0899a9d49a Merge pull request #1027 from arieslee/gvalid-phone-loose
Add 172-segment verification rules, add loose mobile number verificat…
2020-11-29 21:45:28 +08:00
c56f4eabca inprove gconv.Interfaces for struct type 2020-11-29 21:34:28 +08:00
bfe89e0b12 add build-in fuction json for package gview 2020-11-28 22:48:01 +08:00
6cb38cfa92 add update counter method for package gdb. 2020-11-28 14:56:21 +08:00
09bb0c9397 更新gdb.Update方法 2020-11-28 13:52:17 +08:00
fa47b0306d Add 172-segment verification rules, add loose mobile number verification rules. 2020-11-28 12:23:18 +08:00
55429ad589 fix data race issue in unit testing case of package gdb 2020-11-28 00:11:22 +08:00
9592fb099f Change time string argument wrapping with TO_DATE function for DriverOracle in package gdb 2020-11-27 23:11:55 +08:00
18ec6116ad improve time argument timezone handling for package gdb 2020-11-27 22:51:34 +08:00
9d0f306684 improve time argument timezone handling for package gdb 2020-11-27 21:03:22 +08:00
3eba8d690f add TimeMaintainDisabled configuration for automatic time maintaining feature 2020-11-27 13:28:18 +08:00
c0b59007ce improve configuration for package gdb 2020-11-27 13:24:05 +08:00
3485ba2a5d improve package gtime 2020-11-26 22:40:55 +08:00
43ecfc7484 Merge branch 'develop' of https://github.com/gogf/gf into develop 2020-11-26 22:12:48 +08:00
5ba53e56c9 improve join feature for sub-query for gdb.Model 2020-11-26 22:11:58 +08:00
af1d14ace6 Merge pull request #1021 from tiansin/develop
fix: 🐛 fix model chunk page
2020-11-26 21:40:45 +08:00
c02bf715c5 improve gutil.ListItemValues/ListItemValuesUnique supporting retrieving values from slice attributes 2020-11-26 21:13:44 +08:00
0c0e902b07 if CreatedAt/UpdatedAt/DeletedAt field name configured, just use it, ignore the default field names 2020-11-26 20:17:24 +08:00
750b53d7aa improve debug infor for argument of time.Time for package gdb 2020-11-26 19:53:44 +08:00
1d807c095a Merge branch 'master' into develop 2020-11-26 19:28:25 +08:00
69b5873bf9 fix: 🐛 fix model chunk page 2020-11-26 14:26:32 +08:00
60fc9b6417 add gerror.ApiCurrent impements for gerror.Error 2020-11-25 19:06:29 +08:00
0bc8944a08 change ghttp.NewClient to g.Client 2020-11-25 16:40:45 +08:00
33292f54e0 improve status handler by supporting multiple status handler for package ghttp 2020-11-25 16:37:41 +08:00
fc215ef0b2 add function ghttp.RouterGroup.ALLMap 2020-11-24 21:19:01 +08:00
65c67427d4 compatible with Case of https://github.com/pkg/errors 2020-11-23 16:32:57 +08:00
bc8142974f version update 2020-11-21 14:08:29 +08:00
fadb7a8f8f fix issue 1002 2020-11-21 13:20:32 +08:00
e1bfe90833 improve package gdb for structire retrieving in transaction operations 2020-11-21 12:24:32 +08:00
042dc0b33f improve package gdb for structire retrieving in transaction operations 2020-11-21 11:42:50 +08:00
8ca535dbf0 fix issue in session cookie feature 2020-11-21 11:18:21 +08:00
e20183e7a1 improve gutil.Keys/Values for embedded struct 2020-11-20 00:53:12 +08:00
df86ffb61e improve package glog for nil file pointer 2020-11-19 20:43:44 +08:00
bfcf133c91 improve sqlite.Open 2020-11-19 20:37:27 +08:00
24a377d3a8 fix issue in custom mapping for gconv.Struct 2020-11-19 14:52:19 +08:00
baf51bc68f merge develop 2020-11-18 10:57:14 +08:00
5f4b585164 version updates 2020-11-18 10:52:53 +08:00
17a11187b0 fix issue in gdb.Model.Fields 2020-11-18 00:32:09 +08:00
7caf7976cf add gdb.Model.Args 2020-11-18 00:16:34 +08:00
1a31792c14 add SpecialCharsMapOrStruct for package ghtml 2020-11-15 16:49:44 +08:00
d56eb49e41 improve performance for gconv.Struct/Structs using directly reflect set 2020-11-15 15:13:40 +08:00
a1236b5e16 donator updates 2020-11-15 11:08:26 +08:00
8f278be0dc improve build-in varables for view of ghttp 2020-11-14 10:24:06 +08:00
f8ab71e7f0 Merge branch 'master' of https://github.com/gogf/gf 2020-11-12 20:52:23 +08:00
9cca3a3ec1 version updates 2020-11-12 20:51:04 +08:00
97bcf2a438 Merge pull request #980 from lutherlau/patch-4
Update garray_sorted_str.go
2020-11-12 20:44:48 +08:00
85dd2e9f4f Merge pull request #978 from lutherlau/patch-1
Update gtimer_timer.go
2020-11-12 20:39:57 +08:00
23d62da87f Merge pull request #981 from lutherlau/patch-3
Update garray_sorted_int.go
2020-11-12 20:39:44 +08:00
b4d947fecd Merge pull request #979 from lutherlau/patch-2
Update garray_sorted_any.go
2020-11-12 20:39:17 +08:00
650c95af31 Merge pull request #982 from lutherlau/patch-5
Update gtree_btree.go
2020-11-12 20:38:51 +08:00
943116d495 appaned parameters to url if http method is GET for ghttp.Client 2020-11-12 20:09:05 +08:00
644df7c16e Merge branch 'master' of https://github.com/gogf/gf 2020-11-12 18:58:05 +08:00
638773b216 improve client dump for package ghttp 2020-11-12 18:57:18 +08:00
889e7914e2 Merge pull request #983 from coolhihi/master
Update gjson_api_new_load.go to make gjson work when sometimes the xml end with space or `\n`
2020-11-12 18:41:36 +08:00
68cc85f2b2 improve file extension handling for package glog 2020-11-12 18:38:58 +08:00
c273ce576b add default configuration for MaxOpenConnCount for package gdb 2020-11-10 21:19:15 +08:00
f8d57096a8 add slice parameter support for gdb.Model.Where 2020-11-10 13:43:12 +08:00
d7542e87ae improve gdb.Model.Count 2020-11-10 10:37:42 +08:00
b178210a31 fix issue in gconv.Map for embedded struct attributes converting 2020-11-10 09:53:12 +08:00
3e6a23b0e1 add more unit testing case for package gview 2020-11-08 18:01:09 +08:00
ee8d2afe58 add build-in function map/maps for package gview 2020-11-08 17:11:04 +08:00
11e102e137 fix issue in internal/structs.MapField 2020-11-08 16:21:09 +08:00
e06b62ecf2 add default value from struct tag for ghttp.Request 2020-11-08 15:44:04 +08:00
d178102f82 remove third party package 'structs'; improve performance for package internal/structs 2020-11-08 14:25:17 +08:00
e1dd5cce7d improve performance for gconv.Struct 2020-11-08 00:06:05 +08:00
1edc1f35fb add individual cache for package gdb/gfile 2020-11-07 20:00:35 +08:00
4df47be521 Make it work when the xml content end with \s* 2020-11-07 18:32:50 +08:00
9cb88bca5a improve fields quoting for gdb.Model 2020-11-06 21:32:10 +08:00
fa8cc1d3f4 improve gutil.Keys 2020-11-06 21:21:09 +08:00
9ae8a7ca33 improve Fields/FieldsEx by adding support for map/struct parameters for gdb.Model 2020-11-06 20:52:16 +08:00
f4da179140 there should be WHERE statement in Update/Delete operations 2020-11-06 00:00:41 +08:00
13330658cb add function Keys/Values for package gutil 2020-11-05 23:32:56 +08:00
9f04e46166 mark gconv.StructDeep/StructsDeep deprecated 2020-11-05 23:02:29 +08:00
1072ea3fb0 Update gtree_btree.go
bugfix: avoid overflow
2020-11-05 22:44:09 +08:00
ea9e8055a4 Update garray_sorted_str.go
bugfix: avoid overflow
2020-11-05 22:42:15 +08:00
784abf2a30 Update garray_sorted_int.go
bugfix: avoid overflow
2020-11-05 22:41:43 +08:00
ed4a70deff Update garray_sorted_any.go
bugfix: avoid overflow
2020-11-05 22:37:36 +08:00
fef20d10a2 Update gtimer_timer.go
bugfix: avoid overflow
2020-11-05 22:33:33 +08:00
176dcdc7cc fix issue in gconv.Struct for json string parameter 2020-11-05 22:19:34 +08:00
12ed05f846 improva package internal/empty by adding more common types assertion 2020-11-05 20:40:34 +08:00
5999f22f76 fix issue in embeded struct validation for package gvalid 2020-11-04 20:04:54 +08:00
c056fd2a06 improve word quoting for function FieldsEx 2020-11-04 19:53:50 +08:00
cb422f043e improve slice converting for package gconv 2020-10-30 22:26:26 +08:00
4ae89dc9f6 improve package internal/structs 2020-10-30 22:04:34 +08:00
4f6f07db1d temporaryly remove guid.N 2020-10-30 14:31:31 +08:00
cd981c7294 improve snowflake number generating for package guid 2020-10-30 12:47:39 +08:00
557d2967fa improve snowflake number generating for package guid 2020-10-30 12:40:35 +08:00
a7a70636dd improve snowflake number generating for package guid 2020-10-30 12:33:56 +08:00
2215661f89 comment update for package guid 2020-10-30 12:24:18 +08:00
a22b590b43 comment update for package guid 2020-10-30 12:22:09 +08:00
1b0b209662 add unique number generating for package guid 2020-10-30 12:11:21 +08:00
2a2761c54f donator updates 2020-10-29 21:11:52 +08:00
1c83d72f39 donator updates 2020-10-28 23:54:40 +08:00
fcea774b59 donator updates 2020-10-28 23:34:19 +08:00
da2ec21571 fix issue 2020-10-27 10:41:18 +08:00
ebb8d8a2f7 fix issue in 2020-10-27 10:40:47 +08:00
9706a9c768 version updates 2020-10-26 21:20:34 +08:00
cee67a8d4e improve urlencoding handling for parameters posted along with file uploading 2020-10-26 20:21:09 +08:00
87650557fd remove debugging codes from package gtime 2020-10-26 19:06:27 +08:00
d3bf52f12f fix issue in unit testing case for package gi18n 2020-10-26 19:00:11 +08:00
6b13a4849b improve package gi18n 2020-10-25 17:33:14 +08:00
8e380c0d9d improve package gtime/gconv for map converting 2020-10-25 11:33:30 +08:00
0caf4bfcec improve gconv.StructDeep 2020-10-25 10:47:47 +08:00
9c3b978b50 improve package ghttp and internal/structs 2020-10-22 15:16:31 +08:00
ab689a7792 improve gutil.Dump 2020-10-22 09:24:57 +08:00
846646d92d improve json validation rule for package gvalid 2020-10-22 09:11:38 +08:00
2eb2b89432 improve gconv.Struct* by doing the converting using json.Unmarshal if given params is json string/bytes 2020-10-21 14:09:16 +08:00
43441a8218 allow custom validation rule validate empty or nil values 2020-10-21 00:08:36 +08:00
561a541fa1 add custom CreatedAt/UpdatedAt/DeletedAt filed name configuration for package gdb 2020-10-20 21:01:39 +08:00
ffe9ecc141 improve package internal/empty 2020-10-20 14:07:01 +08:00
77f7884604 add function gutil.Try/g.Try;improve error string for gconv.Struct 2020-10-20 13:36:43 +08:00
0a203d1e22 fix issue in struct converting for ghttp.Request 2020-10-19 11:29:41 +08:00
f4f4550483 improve package gerror 2020-10-18 20:18:55 +08:00
e87226a092 improve package gerror 2020-10-18 11:29:09 +08:00
391a3ec9bd version update 2020-10-18 11:26:19 +08:00
dd5cd31ef5 add automatic data key to field name mapping feature for package gdb 2020-10-17 18:16:13 +08:00
de92e804fe Merge branch 'master' of https://github.com/gogf/gf 2020-10-17 17:17:27 +08:00
7725d9aaaf add Current/Next function for package gerror 2020-10-17 17:17:10 +08:00
bd3e25adea Merge pull request #946 from yuancjun/patch-1
Update ghttp_server_config.go
2020-10-15 20:41:07 +08:00
0b1d49af4b upgrade fsnotify to v1.4.9 2020-10-15 20:14:35 +08:00
7efa9e351e remove default initialization function and add lazy initialization feature for package gfsnotify 2020-10-15 20:07:21 +08:00
0b0141954b Update ghttp_server_config.go 2020-10-15 18:04:32 +08:00
82b531fbfb add domain support for domain of ghttp.Server 2020-10-14 21:18:11 +08:00
67fb626339 add configuration SessionCookieOutput for ghttp.Server 2020-10-14 20:52:26 +08:00
9044d5f05d fix issue in custom session id lost for ghttp.Request 2020-10-13 20:34:31 +08:00
47663aa1f1 fix issue of EOF in ghttp.Request when no data posted using form-data 2020-10-13 20:12:54 +08:00
63c0aab19c improve package gtime 2020-10-12 23:32:32 +08:00
261216f5e4 improve structure sql for package gdb 2020-10-12 23:22:56 +08:00
f88b799d67 add more unit testing case for package gdb 2020-10-11 22:21:03 +08:00
9c48dd172c add auto-json support for slice/struct attribute for data inserting of package gdb 2020-10-10 17:29:38 +08:00
09ce105eee improve gdb.Model.Fields/FieldsEx for package gdb 2020-10-10 14:00:10 +08:00
651aa895f8 improve function addWordBoundariesToNumbers for package gstr 2020-10-10 13:38:28 +08:00
0509e41198 recover number for unit testing case of package gconv 2020-10-10 00:04:55 +08:00
1b40d6a53a do tx.Rollback if there's panic in gdb.Transaction 2020-10-09 23:42:33 +08:00
f9189d48d1 remove type ValueFunc from package gcache 2020-10-09 23:36:39 +08:00
849874a247 improve adapter definition for package gcache 2020-10-09 20:59:49 +08:00
3f6510bae7 fix issue in gconv.Struct 2020-09-29 23:47:37 +08:00
a585a26c39 improve custom rule function type for package gvalid 2020-09-29 23:25:20 +08:00
9943966a86 improva function formatSql for package gdb 2020-09-29 22:53:44 +08:00
3617e51c01 improve gdb.Model.ScanList 2020-09-28 23:52:02 +08:00
c931032f08 comment update for gdb.Model.Unscoped 2020-09-27 23:37:40 +08:00
37b286eaa4 improve performance for gconv.Maps;comment update for package gcache 2020-09-27 22:35:02 +08:00
619287c273 improve cache feature for package gdb 2020-09-27 00:15:11 +08:00
aeb9b68298 improve adapter feature for package gcache 2020-09-26 22:44:07 +08:00
bae8f6315b comment updat 2020-09-26 21:13:09 +08:00
a6f70f8935 comment updat 2020-09-26 21:00:28 +08:00
acca6f4009 add adapter feature for package gcache 2020-09-26 20:47:29 +08:00
727fdd2391 improve unit testing case for association feature for package gdb 2020-09-25 08:33:22 +08:00
1d174e00c0 improve package internal/intlog 2020-09-24 23:46:19 +08:00
a5e3e2f5ba change g.SetDebug function to control the debugging information for framework 2020-09-24 23:40:44 +08:00
da43c2d52f improve example for package gview 2020-09-22 20:12:34 +08:00
262f27748c improve custom validation rule feature for package gvalid 2020-09-22 08:45:22 +08:00
a29aef7e1c improve package gvalid for custom rule 2020-09-21 23:51:30 +08:00
1671391195 comment updates 2020-09-21 22:56:48 +08:00
28b0d59c61 improve package gcfg/gjson for data loading 2020-09-21 21:30:58 +08:00
86433cef25 improve gtime.New, gconv.String 2020-09-18 23:59:49 +08:00
e96ccd5f71 v1.13.6 2020-09-17 23:49:03 +08:00
50a087bb3d Merge branch 'master' of https://github.com/gogf/gf 2020-09-17 23:41:23 +08:00
1ec049c52f improve gf server for routes check while starting 2020-09-17 23:27:10 +08:00
ec38805542 Merge pull request #908 from cai1111/patch-2
Update gdb_driver_mssql.go
2020-09-17 19:23:25 +08:00
4c8517d075 Update gdb_driver_mssql.go 2020-09-17 11:06:24 +08:00
edf06da6ea add struct which implements Interfaces function parameter support for gdb.Model.Insert/Save 2020-09-13 11:21:10 +08:00
eb43a2040e add ghttp.Client.RedirectLimit and gfile.ScanDirFileFunc 2020-09-09 22:26:46 +08:00
9d0ecc7d3e add more unit testing case for package gdb 2020-09-07 20:25:59 +08:00
ad943c5e02 improve gjson.New by using gconv.MapDeep for map/struct 2020-09-07 19:44:11 +08:00
bdb4fd0d25 donator updates 2020-09-07 19:10:04 +08:00
2440e05457 fix issue in limit operations for database driver oracle 2020-09-03 22:38:07 +08:00
1337c6c0d1 add sub query sql support for join functions 2020-09-03 21:57:58 +08:00
957689e07c up 2020-09-02 23:22:16 +08:00
3952d74f87 up 2020-09-02 21:36:21 +08:00
6dc4b81693 add max recursive depth for directory scanning for function gfile.Scan* 2020-09-02 21:25:02 +08:00
9cd953b7be improve function FieldsEx by filtering fields from custom fields specified by function Fields for package gdb 2020-09-02 20:37:02 +08:00
631810dda2 add function String for package gmap 2020-09-02 19:53:58 +08:00
8c12bc5506 change panic to internal logging for package glog 2020-09-01 21:22:19 +08:00
d4091a4826 improve some transaction operations by directly calling model operations, making their implements logic the same 2020-08-31 15:57:04 +08:00
a7c269886b improve support for dynamic database configurations in codes 2020-08-31 15:39:27 +08:00
f54593037b improve CURD functions for package gdb 2020-08-31 00:59:42 +08:00
0415cf6a08 fix issue in nil gtime attribute for model entity for package gdb 2020-08-31 00:39:12 +08:00
87c22d32b0 version updates 2020-08-26 14:49:53 +08:00
27dd15b403 improve initialization for logger of package glog 2020-08-26 14:37:02 +08:00
dd452c19ce add example for custom uploading file name for ghttp.Server 2020-08-24 23:05:30 +08:00
acc0846cf3 fix issue in unit testing case of package gvalid 2020-08-24 22:26:12 +08:00
5a6738841f travis ci update 2020-08-22 00:21:24 +08:00
bea451c9d6 improve date type support for package gdb; improve datetime string for gtime.StrToTime; improve function gtime.New for more types 2020-08-21 23:41:12 +08:00
676e904ec6 improve package gvalid 2020-08-21 00:00:00 +08:00
49aa5c61bc improve package gvalid 2020-08-20 23:37:02 +08:00
a2272b852c improve package gvalid 2020-08-20 23:28:58 +08:00
1fa77630f9 improve package gvalid 2020-08-20 23:28:10 +08:00
a841c4cc05 improve package gvalid 2020-08-20 23:25:36 +08:00
1874808e3b improve unit testing case for package gcache 2020-08-19 21:37:26 +08:00
149b67916b README updates 2020-08-19 21:10:40 +08:00
7fb6f58162 README updates 2020-08-19 21:09:25 +08:00
a309114a18 donator updates 2020-08-15 21:58:03 +08:00
35cbde9530 comment update for package gstr 2020-08-15 21:28:24 +08:00
b9211b182a comment update for function ghttp.Request. 2020-08-15 12:35:56 +08:00
81ec499ae9 Merge pull request #867 from pingyeaa/master
Solve the problem of invalid modification of request parameters
2020-08-15 12:33:24 +08:00
f2e276eabd add function Test_Params_Modify for ghttp_unit_param_test.go 2020-08-14 20:02:52 +08:00
f6dbaba1f8 add function ReloadParam for ghttp_request.go 2020-08-14 18:34:43 +08:00
65dcff052a add function ReloadParam for ghttp_request.go 2020-08-14 18:19:48 +08:00
e3861567c7 add function ReloadParam for ghttp_request.go 2020-08-14 16:22:37 +08:00
e89a20c725 add ReloadParam func to ghttp_request.go 2020-08-14 15:19:56 +08:00
a8acc6bd28 update unit testing case for package gdb 2020-08-14 00:51:22 +08:00
eb5efc735e improve unit testing case of ScanList for package gdb 2020-08-13 23:45:22 +08:00
737af527cd improve *Struct functions for ghttp.Request 2020-08-13 23:29:00 +08:00
875d2b7e63 donator updates 2020-08-13 19:25:51 +08:00
bf1cb0e1bd donator updates 2020-08-13 19:23:31 +08:00
2bfeb1b06c README updates 2020-08-13 18:59:13 +08:00
820e4302b7 improve function *Struct for ghttp.Request 2020-08-13 18:51:59 +08:00
84d761b418 add function AddWithRecover for package grpool 2020-08-12 23:53:05 +08:00
e5e27f2ac4 add function GetRouterMap for ghtt.Request 2020-08-12 21:01:17 +08:00
efca9b18a8 improve content type checks for package gjson 2020-08-12 20:53:47 +08:00
607821ecbc add function LoadContentType for package gjson 2020-08-12 20:38:48 +08:00
7cc1b239d4 add functions Update/UpdateExpire/GetExpire for package gcache 2020-08-12 20:13:13 +08:00
efa8de34da Merge pull request #860 from XWR940711/master
add func gcache.SetVar/gcache.SetExpire/gcacge.GetExpire.
2020-08-12 19:19:19 +08:00
bcf45e3c5a CI-glog失败重测 2020-08-12 10:32:40 +08:00
0a3cd1d2ab 修正方法代码.使用Benchmark测试. 2020-08-12 09:57:47 +08:00
3e621856c8 change the port range for unit testing cases of ghttp.Server 2020-08-12 09:10:50 +08:00
32e4d64ddb improve package gjson for automatic content type checking 2020-08-12 00:11:25 +08:00
46e45ca84b improve package gjson for automatic content type checking 2020-08-11 23:46:21 +08:00
fcb13bd8ee improve package gjson for automatic content type checking 2020-08-11 23:36:40 +08:00
eacad9b453 improve package gjson for automatic content type checking 2020-08-11 23:22:09 +08:00
ed479e2a13 improve package gjson for automatic content type checking 2020-08-11 23:20:22 +08:00
19937cb75d improve MapDeep for package gconv 2020-08-11 20:13:47 +08:00
a95093222c add GetRemoteIp for ghttp.Request; add *Var feature for ghttp.Client 2020-08-11 15:23:42 +08:00
7b599d1882 Merge branch 'master' of https://github.com/gogf/gf 2020-08-10 23:04:28 +08:00
4d501fd2f4 improve function Set for package gjson 2020-08-10 23:03:35 +08:00
c3d3053ded improve GetOrSetFunc for package gcache 2020-08-09 21:28:31 +08:00
14d5fd3e11 add translation format feature for package gi18n 2020-08-08 16:46:52 +08:00
9f79453334 improve ghttp.Server by closing the request and response body to release the file descriptor in time 2020-08-08 11:09:58 +08:00
c7f1c881c0 Merge pull request #850 from coderzhuang/master
fix: Access-Control-Request-Headers
2020-08-08 09:59:45 +08:00
c39c032b4e Merge pull request #844 from qinyuguang/scan
gcmd.Scan supports read line that contains whitespace
2020-08-08 09:58:32 +08:00
fa96c18308 add function MapOmitEmpty for package gutil 2020-08-08 09:53:32 +08:00
d90145a47f add goroutine id retrieving feature for package gdebug 2020-08-08 09:42:24 +08:00
4871f86346 adjust TestCache_Expire_SetVar Test Code. 2020-08-07 16:26:26 +08:00
919eaf1e9a adjust TestCache_Expire_SetVar Test Code. 2020-08-07 14:05:21 +08:00
8a84ca16d1 add func gcache.SetVar/gcache.SetExpire/gcacge.GetExpire.
add test TestCache_Expire_SetVar.
2020-08-07 13:24:41 +08:00
12b4fdd692 fix: Access-Control-Request-Headers 2020-08-04 11:57:42 +08:00
3d8451d5d0 comment update for gdb.Model.Page 2020-08-04 09:22:21 +08:00
cf88f28519 gcmd.Scanf supports read line that contains whitespace 2020-08-03 21:00:02 +08:00
15d99eee46 add more unit testing case for ghttp.Server 2020-08-03 20:49:19 +08:00
6d68277db8 improve cookie feature for ghttp.Server 2020-08-03 20:00:00 +08:00
3e3b5557f7 readme updates 2020-08-03 18:58:43 +08:00
ba1a9d9f8e gcmd.Scan supports read line that contains whitespace 2020-08-01 02:13:42 +08:00
3e1a7953ec Merge branch 'master' of https://github.com/gogf/gf 2020-07-31 09:57:45 +08:00
073fb2d717 improve sql logging structure for package gdb 2020-07-31 09:57:26 +08:00
7f33021184 Merge pull request #825 from chenall/gjson-support-utf8-with-bom
fix configfile with UTF8-BOM issue
2020-07-31 00:08:05 +08:00
b396096721 improve dry-run feature by adding global dry-run variable reading from environment or command options 2020-07-30 23:08:27 +08:00
0a5c6d832f add configration group name for logging content for package gdb 2020-07-30 23:00:20 +08:00
d279566114 Merge pull request #769 from fxk2006/master 2020-07-30 22:55:39 +08:00
2693cbb136 add more unit testing case for ghttp.Server 2020-07-30 22:45:50 +08:00
f7a9be4292 improve package glog for rotation feature 2020-07-30 21:09:45 +08:00
a926033b66 move Separator from const to variable for package gfile 2020-07-30 20:57:08 +08:00
dbcdd06b19 Merge branch 'master' of https://github.com/gogf/gf 2020-07-30 20:49:32 +08:00
ff5dab5c70 improve package glog for rotation feature 2020-07-30 20:49:11 +08:00
84b576418f Merge pull request #835 from XWR940711/master
add func gtimer.Entry.Reset()
2020-07-30 20:20:50 +08:00
253b124903 fix issue in database configuration for package gind 2020-07-30 20:18:18 +08:00
33dc5ddf79 fix issue in database configuration for package gind 2020-07-30 18:52:27 +08:00
a456fa537c fix logger configure issue for package gdb 2020-07-30 17:16:29 +08:00
9e1fb93e08 adjust gtimer.Entry.Reset() Test Code. 2020-07-30 11:00:19 +08:00
5d24f702be adjust gtimer.Entry.Reset() Test Code. 2020-07-30 10:37:48 +08:00
ca8e2c2986 version updates 2020-07-29 23:19:59 +08:00
2f0e5a45c5 improve package gcron 2020-07-29 23:03:31 +08:00
c4b28b0bc4 improve gtime.ParseDuration 2020-07-29 11:44:58 +08:00
6cc4747965 add func gtimer.Entry.Reset() 2020-07-29 11:22:46 +08:00
91cd34b26a improve multiple seperator chars handling for router of ghttp.Server 2020-07-29 00:32:54 +08:00
e35a2f028c add timeout feature for Do/Receive functions of package gredis 2020-07-28 23:48:12 +08:00
9cff2bd10f add function ParseDuration and time unit 'd' support for package gtime 2020-07-28 22:46:15 +08:00
6d406498db improve result data type converting for package gdb 2020-07-28 20:31:50 +08:00
939ae37baf example codes update for package gdb 2020-07-28 19:55:13 +08:00
4d6c8744e5 upgrade mxj 2020-07-25 15:31:51 +08:00
e252d8b740 add function ListItemValuesUnique for package gdb 2020-07-25 15:05:08 +08:00
9b8d63e21b improve graceful reload feature for ghttp.Server 2020-07-25 14:09:03 +08:00
437fc04620 improve testCfg_With_UTF8_BOM unit_test 2020-07-25 14:07:33 +08:00
04dee090a3 improve graceful reload feature for ghttp.Server 2020-07-25 13:50:04 +08:00
245c6d24a1 improve ghttp.Client 2020-07-25 11:24:35 +08:00
e92fd05f9f Merge pull request #815 from tikrgo/camelcaseConvert 2020-07-25 11:07:51 +08:00
937f8e6919 fix configfile with UTF8-BOM issue 2020-07-25 10:57:40 +08:00
f489e6273e fix issue 819 2020-07-25 10:54:48 +08:00
4f99bdbc87 Merge branch 'master' of https://github.com/gogf/gf into camelcaseConvert 2020-07-24 09:49:53 +08:00
1250b33220 将正则移到全局提高效率 2020-07-24 09:48:51 +08:00
b57aee4595 Merge pull request #800 from chenghonour/master
Add database method
2020-07-23 21:30:24 +08:00
d9da51933d improve gconv.Struct 2020-07-23 21:15:54 +08:00
9fca93e7d8 Merge branch 'master' of https://github.com/gogf/gf 2020-07-23 21:01:37 +08:00
854b2ed185 improve function convertValue for package gdb 2020-07-23 21:01:16 +08:00
cfac03bc40 Merge pull request #814 from xbkaishui/support-redis-tls
support redis tls
2020-07-22 19:49:29 +08:00
a3cb4a6ae8 驼峰转换下划线时,不连续大写字母首位加下划线规范 2020-07-22 16:15:06 +08:00
2798fa4444 revert unit test 2020-07-22 15:27:00 +08:00
8bac0614f5 format code 2020-07-22 15:13:40 +08:00
646280a6a9 remove tls unit test case 2020-07-22 15:08:32 +08:00
208bdffdf7 update comment 2020-07-22 14:02:21 +08:00
9e7291903f support redis tls 2020-07-22 13:28:45 +08:00
d56835fc00 go fmt 2020-07-21 13:28:25 +08:00
1d5e717a80 update err return 2020-07-21 12:40:13 +08:00
2f44d9ae18 add unit test 2020-07-21 12:37:04 +08:00
0627ab81d6 Merge pull request #810 from chenall/master
fix ghttp_client upload filename issue #809
2020-07-21 10:52:39 +08:00
8167a398fc add function GetHeader for ghttp.Request 2020-07-21 10:17:31 +08:00
6291751014 fix ghttp_client upload filename issue #809 2020-07-21 09:57:13 +08:00
ee5ddaab52 fix place holder for pgsql 2020-07-20 22:47:12 +08:00
207476be1f Merge pull request #807 from tiancai45/master
fix issue pq: syntax error at or near $
2020-07-20 22:15:20 +08:00
b9b470c2ae Merge branch 'master' into master 2020-07-20 22:14:29 +08:00
52b6e8ef9d fix place holder for mssql 2020-07-20 21:55:34 +08:00
48c84bf74a fix place holder for mssql 2020-07-20 21:48:44 +08:00
5be30b3684 fix issue in logging file rotation 2020-07-20 21:32:28 +08:00
54a2b13825 Merge pull request #802 from csrgxtu/bug/log-file-rotate
bug/log-file-rotate: fix big file even with rotate-by-size and rotate…
2020-07-20 21:30:52 +08:00
d44ddae3dc debug postgre 2020-07-20 19:13:15 +08:00
7bbc2459ba postgre 报错 pq: syntax error at or near $ 2020-07-19 23:24:35 +08:00
0cb77caa2a Merge pull request #803 from housemecn/master
update tencent site
2020-07-18 10:40:18 +08:00
3f5f76458d Update README_ZH.MD
update tencent site
2020-07-18 10:36:48 +08:00
835e07e8de Update README.MD
update tencent site
2020-07-18 10:34:32 +08:00
3fc5e43abe readme update 2020-07-18 10:21:17 +08:00
9c8cb26bd6 readme update 2020-07-18 10:17:05 +08:00
540f4d2d0c donation update 2020-07-18 10:06:26 +08:00
51be255821 remove gfcache usage from repo 2020-07-18 09:44:15 +08:00
7d278fea25 users update in readme 2020-07-18 09:40:39 +08:00
ca72d3b23a remove gfcache usage from repo 2020-07-18 08:32:35 +08:00
e3b8f374e5 Merge pull request #1 from gogf/master
pr from gf
2020-07-17 16:27:51 +08:00
534cd3be1c add table field method 2020-07-17 14:28:50 +08:00
78536de1b5 add database method 2020-07-17 11:28:47 +08:00
edc67d9ec3 bug/log-file-rotate: fix big file even with rotate-by-size and rotate-back-expire 2020-07-17 10:39:14 +08:00
4dd12434b7 add file cache feature for package gfile and remove package gfcache 2020-07-16 12:31:13 +08:00
f654bb2eda comment update for package gtree 2020-07-16 11:46:11 +08:00
205f98cfeb improve gconv.Struct for interface UnmarshalValue 2020-07-15 23:30:07 +08:00
69fa5bf464 improve package gtime for nil gtime.Time object 2020-07-15 20:37:13 +08:00
e7dc58ac6c unit testing case update for package gdb 2020-07-15 20:21:04 +08:00
2033299632 improve placeholder for pgsql 2020-07-15 20:15:09 +08:00
639d34d5d9 fix issue in incorrect debug sql information for package gdb 2020-07-15 20:10:54 +08:00
605181da32 fix issue in gins.Database 2020-07-15 19:17:42 +08:00
183f631190 improve Model.One for package gdb 2020-07-15 09:15:03 +08:00
64c99b9871 add configuration updating feature for package gcfg 2020-07-15 00:07:07 +08:00
d29b0a27ff Merge pull request #760 from kirileec/master
add a SetProxy function and a chaining function Proxy for ghttp.Clien…
2020-07-14 23:09:06 +08:00
aaa726e6dc add limit 1 for function One of package gdb 2020-07-14 21:42:28 +08:00
05cc0c4644 improve gconv.Struct for nil attribute interface 2020-07-14 21:34:29 +08:00
e1c0a92e60 improve the performance when converting struct that implements UnmarshalValue 2020-07-13 23:51:36 +08:00
c770e4779a Merge pull request #758 from wnstar/log
log added function name display
2020-07-13 23:21:49 +08:00
c135122ca1 improve package gconv for detailed handling of interface attributes 2020-07-13 23:13:50 +08:00
1d87df2afe add more unit testing case for package ghttp 2020-07-13 22:45:20 +08:00
8efc0ca0ea comment update for package gvalid 2020-07-12 10:33:24 +08:00
001d524ff7 readme update 2020-07-12 10:25:15 +08:00
5c5dce9dc3 comment update for admin controller of package ghttp 2020-07-12 09:56:07 +08:00
293256c2ca improve package gmode 2020-07-12 09:34:43 +08:00
4e027c1de3 improve argument handling for empty slice for package gdb 2020-07-11 09:53:16 +08:00
6712a33164 fix issue 785 in function Unique for packge garray 2020-07-10 22:26:02 +08:00
98531143a6 donator updates 2020-07-10 21:32:53 +08:00
71127ba308 improve package gins 2020-07-10 00:20:46 +08:00
0f6f571ccb remove the space trimming of the validation value for package gvalid 2020-07-08 20:53:56 +08:00
9b6936a4fb deprecate function DB.Table; improve the configuration node name case-insensitive and ignoring special chars 2020-07-08 20:48:29 +08:00
8b78609412 add more unit testing case for package gdb 2020-07-08 19:12:48 +08:00
4a31082f8c improve function Struct/StructDeep for package gconv 2020-07-08 11:32:35 +08:00
3643a69d8d improve function Struct/StructDeep for package gconv 2020-07-08 10:52:45 +08:00
adbaa4aa89 donator updates 2020-07-07 22:06:35 +08:00
0e025eda1b improve function Struct for package gconv 2020-07-06 22:37:37 +08:00
7c44bf8e94 Merge branch 'develop' of https://github.com/gogf/gf into develop 2020-07-06 21:18:51 +08:00
e6718f1113 improve function Struct for package gconv 2020-07-06 21:18:25 +08:00
f3f6adb03a read Client's timeout for net.Dialer
make sure Client.Transport is *http.Transport
2020-07-05 20:52:33 +08:00
977827e453 add examples for SetProxy function and Proxy chaining function 2020-07-05 20:52:33 +08:00
bcc9153991 add a SetProxy function and a chaining function Proxy for ghttp.Client to do HTTP request via proxy. #285 2020-07-05 20:52:32 +08:00
c04be14cd9 add custom validation rule feature for package gvalid 2020-07-05 18:55:38 +08:00
de8f29751d improve function ScanList for package gdb 2020-07-05 12:17:56 +08:00
12d58e4d08 add ScanList feature for gdb.Model 2020-07-05 11:54:37 +08:00
3ae44185f4 add ScanList feature for gdb.Result 2020-07-05 11:23:39 +08:00
1290f42f75 improving package gdb 2020-07-04 08:50:52 +08:00
17b91dcad7 add ListItemValues/ListItemValuesUnique functions and associated unit testing cases for package gutil/gvar 2020-07-02 23:40:34 +08:00
72da1642ee add more unit testing case for ghttp.Client 2020-07-02 19:12:01 +08:00
76d93b3a61 donator updates 2020-07-01 23:05:39 +08:00
7be0ee9566 donator updates 2020-07-01 23:02:07 +08:00
326e1f8da5 donator updates 2020-07-01 22:53:34 +08:00
e4e44ddd19 revert gvar.Var from interface to struct 2020-06-29 17:23:49 +08:00
46bdde9265 revert gvar.Var from interface to struct 2020-06-29 13:40:19 +08:00
09eba58927 add more unit testing case for ghttp.Client 2020-06-28 23:23:09 +08:00
0e884c78f5 fix issue of https://github.com/gogf/gf/issues/765 2020-06-28 23:03:41 +08:00
2f44721086 fix issue in reload feature in ghttp.Server 2020-06-28 20:52:33 +08:00
6e08eebcbe 修改sql打印debug信息,增加数据库配置的group名称,用于区分sql来源,尤其是多数据库配置的时候 2020-06-28 16:58:43 +08:00
d9422d00ac 修改sql打印debug信息,增加数据库配置的group名称,用于区分sql来源,尤其是多数据库配置的时候 2020-06-28 16:50:13 +08:00
efc0501548 Merge branch 'master' of https://github.com/gogf/gf 2020-06-22 21:56:29 +08:00
bb07c60838 rename CopySlice to SliceCopy for package gutil 2020-06-22 21:56:10 +08:00
330ea05ca3 Merge pull request #755 from wnstar/master
add SetRedirectLimit function to do HTTP client. #714
2020-06-22 21:21:05 +08:00
1f534b48a3 Merge pull request #757 from leoleoasd/patch-1
Fix typo in git ignore
2020-06-22 20:30:35 +08:00
aceae5eee3 add todo for package gpool 2020-06-22 20:08:27 +08:00
d4d66fd529 improve package gtime 2020-06-22 19:46:39 +08:00
b7686d6d37 log added function name display 2020-06-22 11:04:57 +08:00
Leo
b97e397354 Fix typo in gitignore 2020-06-22 09:41:02 +08:00
ab8fbf171e add SetRedirectLimit function to client 2020-06-21 19:17:39 +08:00
2c0cfa24b0 fix issue in package gjson for struct to map converting 2020-06-18 20:40:24 +08:00
f28a76d470 merge develop 2020-06-17 23:59:20 +08:00
f3525c84a3 fix issue in debug infor for soft deleting feature of package gdb 2020-06-17 23:47:47 +08:00
abe9b54112 embarrassing jsoniter of another incompatibility with stdlib json 2020-06-17 21:43:51 +08:00
b2aa59d893 import third-party library json-iterator to improve the performance for json operations 2020-06-17 21:16:25 +08:00
9e9865afa7 author updates 2020-06-17 18:58:24 +08:00
ecc439d4e8 author update 2020-06-17 14:44:16 +08:00
452f0fc99e add Scan/ScanDeep for package gvar 2020-06-17 11:40:37 +08:00
54f47845f6 entity feature developing for package gdb 2020-06-17 11:37:45 +08:00
cb238cd6d9 add todo for gconv.Convert 2020-06-16 20:44:57 +08:00
897a9f4584 Merge branch 'develop' 2020-06-16 20:42:26 +08:00
55f9b121de Merge pull request #738 from fxk2006/fix_SessionRedis 2020-06-16 20:41:53 +08:00
386f38af5e improve gconv.Struct 2020-06-16 20:18:40 +08:00
65cea430c2 improva gconv.Struct 2020-06-16 19:30:35 +08:00
4d38b508a3 improve gvar by changig gvar.Var from type struct to interface 2020-06-16 17:38:05 +08:00
5c774fd391 improve function Structs for package gconv 2020-06-16 11:37:00 +08:00
f6d760e90f 1、修复redis存储session时,最大过期时间问题: ttl.Seconds()返回float64在redis中报错 2020-06-16 11:19:08 +08:00
c3ffa40bad improve Response/ResponseWriter by implementing http.Flusher for package ghttp 2020-06-15 23:36:20 +08:00
5ce5d0e593 improve auto marshal for struct slice for package gredis 2020-06-15 23:19:38 +08:00
b83f1efde8 remove panic for stdout error for package glog 2020-06-15 22:57:27 +08:00
ca5f14c366 comment updates for package gtcp 2020-06-15 22:51:44 +08:00
95a8b51fb4 improve map slice converting for package gconv 2020-06-15 18:59:18 +08:00
2b64979730 Merge branch 'master' of https://github.com/gogf/gf 2020-06-15 16:48:17 +08:00
508cb7db88 add and improve Scan/ScanDeep feature for package gdb/gvar/gjson/gconv 2020-06-15 16:46:48 +08:00
e8d6d96883 fix issue in error field name lost for package gvalid 2020-06-14 17:28:48 +08:00
9378a6e7bf readme update 2020-06-13 16:22:49 +08:00
1d609fc5c7 fix issue in unit testing case for package ghttp 2020-06-13 14:52:36 +08:00
49d1e3dbaf fix issue of attribute name lost in package gvalid 2020-06-12 22:25:58 +08:00
b0e9334852 go.mod updates 2020-06-12 14:10:33 +08:00
95bd369959 improve function GetClientIp for ghttp.Request 2020-06-11 18:47:56 +08:00
a433890097 Merge pull request #721 from kuiye/master
add get client realIp
2020-06-11 18:45:42 +08:00
c9c3be517c fix issue in example of package glist 2020-06-11 18:43:35 +08:00
89e122cd31 marge getip func 2020-06-11 09:49:16 +08:00
27c2a03ea8 add example for package gset 2020-06-10 23:07:07 +08:00
b56eb3a948 example update for package garray 2020-06-10 19:50:22 +08:00
fb1b0bfd88 example update for package g/garray/gmap/gset/ghttp 2020-06-10 19:47:25 +08:00
dd10167ec2 example updates for package garray 2020-06-10 19:09:14 +08:00
3138ad10ec add get client realIp 2020-06-10 10:44:41 +08:00
080ca82605 release updates 2020-06-09 21:29:28 +08:00
0290de2360 improve dump feature for ghttp.Request 2020-06-09 20:46:04 +08:00
9b330adc1d Merge pull request #718 from sanrentai/master
improve mssql TableFields func
2020-06-09 19:04:56 +08:00
f3ff1ae08b improve example for package gmap 2020-06-09 16:24:54 +08:00
4f699af051 improve pointer type convertion for package gconv 2020-06-09 14:19:23 +08:00
7ebc7259cb improve mssql TableFields func 2020-06-09 14:02:43 +08:00
9d22edbdb8 donator updates 2020-06-08 23:08:58 +08:00
7e95058cb5 donator updates 2020-06-08 22:34:48 +08:00
f33753e0cd add example for package ghttp/glog 2020-06-08 20:21:35 +08:00
ac71e1d753 rename Dump to RawDump for ghttp.ClientResponse 2020-06-08 19:26:14 +08:00
8151b6efd6 add more example for package gredis 2020-06-08 19:17:24 +08:00
94de306c93 add zero time filtering for package gdb 2020-06-08 13:46:45 +08:00
51f8ea26de add example for package gredis 2020-06-06 18:12:42 +08:00
29d9bb17cd improve function Unscoped for package gdb 2020-06-06 16:28:16 +08:00
30501a882d improve function Struct for package gconv 2020-06-06 15:31:04 +08:00
f2f98e1d16 rename testing file names for package gdb 2020-06-06 14:38:05 +08:00
cbf465eeea improve body interface implements for ghttp.Reqest/Response 2020-06-06 13:34:58 +08:00
79c400e912 Merge branch 'master' of https://github.com/gogf/gf 2020-06-06 10:10:05 +08:00
cc4c49b5b0 add unit testing case for pointer attribute mapping for function Parse 2020-06-06 10:09:19 +08:00
96ea2c911d Merge pull request #696 from sanrentai/master
the sqlserver type money  should be converted to float64
2020-06-05 21:08:49 +08:00
131b11680a readme update 2020-06-05 20:36:05 +08:00
3c6ab96283 fix issue in function Walk and add more example for package gset 2020-06-04 21:46:22 +08:00
d2c4fa921a add more example for package gmap 2020-06-04 20:45:18 +08:00
dbb51a9328 improve package glist 2020-06-04 20:13:33 +08:00
55bfc3fa73 add more examples for package garray 2020-06-04 18:28:33 +08:00
d9c5182d1a gitignore updates 2020-06-04 17:56:32 +08:00
899fcbf2da add mor example for package garray 2020-06-04 17:55:43 +08:00
6e2c0d8706 comment and readme update 2020-06-04 17:29:16 +08:00
c4e599ce63 improve random bytes buffer hanlding for package grand 2020-06-04 14:45:56 +08:00
9cad9e4467 add more unit testing cases for package gstr 2020-06-04 00:03:30 +08:00
48019444ea README and DONATOR update 2020-06-03 23:49:12 +08:00
76d31a7fbb improve slice result handling by treating it as string slice for package gredis 2020-06-03 23:44:21 +08:00
facb9d93c0 fix issue of multiple slice arguments handling in function where 2020-06-03 21:36:16 +08:00
1d6bd46c5e README updates 2020-06-03 20:33:21 +08:00
8646dc1825 Merge pull request #702 from misitebao/master
更新 readme 中文版
2020-06-03 18:49:35 +08:00
2992bdeed7 修改之前的捐赠名称 2020-06-03 11:38:21 +08:00
c5601e6c88 更新 readme 中文版 2020-06-03 10:59:20 +08:00
ef1d9a561c improve the route feature for ghttp.Server 2020-06-03 00:09:51 +08:00
2d3b32c94a money 类型转换错误 2020-05-29 15:41:37 +08:00
269378aa0d fix issue in unit testing case for package gsession; version updates 2020-05-28 20:28:07 +08:00
6889542801 improve package guid 2020-05-27 11:26:05 +08:00
8e6f1f1740 improve performance of random buffer usage for package grand 2020-05-25 23:39:09 +08:00
b6ab1a992c improve empty checks for common interfaces implementer 2020-05-25 14:26:08 +08:00
a5a267567c comment update for package garray 2020-05-22 12:04:58 +08:00
f05f855c07 improve default max header bytes from 1KB to 10KB for ghttp.Server 2020-05-21 20:10:38 +08:00
bc5f773ba6 make WriteTimeout default to 0 for ghttp.Server 2020-05-19 19:16:47 +08:00
55308cc37c improve package gipv4 by formating the value retrieving fuctions to Get* 2020-05-18 23:50:31 +08:00
4d9db6edf0 improve package gconv for map converting 2020-05-18 20:58:19 +08:00
38111a64e3 improve files listing for ghttp.Server 2020-05-18 20:09:00 +08:00
bd8d3fca08 improve domain rule for package gvalid 2020-05-18 19:44:15 +08:00
89ccaa3915 improve function Do for package gredis, adding auto marshal feature for arguments 2020-05-18 19:18:53 +08:00
7c2cff7d99 add function GetVar for package gcache 2020-05-17 18:16:26 +08:00
788e15dbb6 comment update for package guid 2020-05-17 15:40:24 +08:00
a0172d9d7e README updates 2020-05-17 15:16:13 +08:00
bc1a7a1644 README updates 2020-05-17 15:11:07 +08:00
c98234d3e6 improve session feature by allowing custom session id creating function for ghttp.Server 2020-05-17 14:33:27 +08:00
45a94d23d5 improve session feature by allowing custom session id creating function for ghttp.Server 2020-05-17 14:33:21 +08:00
351de5ee6a fix concurrent issue in buffer handling of package grand 2020-05-17 12:46:28 +08:00
3559436d1e improve package guid 2020-05-17 08:50:37 +08:00
189f4c1637 improve package gsession 2020-05-16 22:08:16 +08:00
caead810e2 add package guid; improve performance of package grand 2020-05-16 21:56:31 +08:00
ebdc5d9c9d comment update for package grand 2020-05-16 16:08:30 +08:00
4164059211 add function B for package grand; improve package grand 2020-05-16 16:05:31 +08:00
bd27258c46 donator updates 2020-05-16 15:43:16 +08:00
ddf0605bc4 go mod tidy 2020-05-16 15:36:04 +08:00
991dbe50e0 add more functions for package gipv4; move package guuid to standalone package of gogf 2020-05-16 15:35:21 +08:00
8050efb835 improve package gfile 2020-05-16 14:06:35 +08:00
9355bc73a2 improve package gvalid 2020-05-16 13:31:24 +08:00
acc2a6a353 improve copy feature for package gfile 2020-05-16 00:50:01 +08:00
09e83e7b8d improve version functions for package gstr 2020-05-16 00:12:23 +08:00
c0df8a3d80 improve version functions for package gstr 2020-05-16 00:11:08 +08:00
33e890d225 improve version functions for package gstr 2020-05-16 00:10:12 +08:00
750e5df962 improve gstr.CompareVersion 2020-05-15 23:42:17 +08:00
74c65439fc add function ScanDirFunc for package gfile 2020-05-15 21:51:03 +08:00
f290bd7170 fix issue in http.File implements for package gres 2020-05-14 21:25:54 +08:00
d398b749d4 improve support for types of database pgsql 2020-05-14 21:15:44 +08:00
2fd5a1574a improve package gres 2020-05-14 20:32:01 +08:00
a7504f0629 add more unit testing cases for package gdb 2020-05-13 23:21:11 +08:00
3c35bb85ee improve unit testing cases for package gi18n/ghttp 2020-05-13 19:35:56 +08:00
6621edb04c improve i18n of chinese for package gvalid 2020-05-13 19:10:38 +08:00
b0c722e297 improve package gvalid 2020-05-10 22:34:16 +08:00
47a6284274 improve package gvalid 2020-05-10 22:32:10 +08:00
150b8edb70 improve package gvalid 2020-05-10 17:49:23 +08:00
aa5d3285eb improve package gvalid 2020-05-10 16:48:00 +08:00
993d6e3076 improve package gvalid 2020-05-10 10:56:11 +08:00
78ad9d8c2d improve error message of package gvalid 2020-05-10 09:05:52 +08:00
feff3ddce3 comment update for package ghttp 2020-05-09 19:19:42 +08:00
80fddad64d fix issue in PopRight function for package garray; improve json.Marshal for package garray 2020-05-08 21:08:06 +08:00
1e6dd0be02 readme updates 2020-05-08 19:16:52 +08:00
22ecf4f1b6 add context feature for package glog 2020-05-08 17:12:37 +08:00
5d21148657 comment updates for package ghttp 2020-05-07 23:05:33 +08:00
edb745ed92 version updates 2020-05-07 11:31:34 +08:00
61f4e0da6f improve package gcache 2020-05-06 21:09:02 +08:00
767afa3106 improve package gcache 2020-05-06 19:06:49 +08:00
16779359ee remove package gchan 2020-05-06 18:43:19 +08:00
770653fafa enable the route dump for unit testing of logging feature for ghttp.Server 2020-05-05 00:09:39 +08:00
0c021b6da7 add unit testing case of status handler feature for ghttp.Server 2020-05-05 00:01:09 +08:00
ec92b08f25 add function Maps for package gvar; add function GetMaps for package gjson; improve MapToMap* functions for package gconv 2020-05-04 23:42:51 +08:00
13e2353729 fix lock issue in function search for package garray 2020-05-03 23:08:18 +08:00
90d19a84ce improve package garray/gset, adding function ContainsI 2020-05-03 22:52:04 +08:00
b4c0b95d8a add support for old version of gres 2020-05-03 22:16:12 +08:00
b7e8255066 add support for old version of gre 2020-05-03 22:08:08 +08:00
5f8e6ad9ed comment update for package ghttp 2020-05-01 03:31:04 +08:00
c8d253eb56 change binary content from hex string to base64 string for package gres 2020-05-01 02:35:24 +08:00
4814624cff change binary content from hex string to base64 string for package gres 2020-05-01 02:16:42 +08:00
cc67f3d388 improve package gcompress 2020-05-01 01:47:02 +08:00
f7c2a51c9f fix issue in zip feature for package gcompress; improve package gres 2020-05-01 00:18:45 +08:00
3db83e1159 improve package gtimer 2020-04-30 22:22:35 +08:00
3bb002796c donator update 2020-04-30 20:46:27 +08:00
45170bc53e add ClientMaxBodySize configuration for ghttp.Server 2020-04-30 20:37:09 +08:00
b79ff84c6f add struct slice conversion for request parameters for ghttp.Request; improve package gconv 2020-04-30 16:53:47 +08:00
938c46fec9 readme update 2020-04-29 19:33:14 +08:00
8a13d94526 improve Record.Struct for package gdb 2020-04-29 09:12:13 +08:00
1e844d505a comment update for package ghttp/gconv; readme update 2020-04-29 00:14:29 +08:00
a123a2c086 improve struct conversion of empty result/record for package gdb 2020-04-28 21:03:25 +08:00
1eeeeb853e improve unit testing case of error logging for ghttp.Server 2020-04-28 15:21:17 +08:00
6e7224e306 improve error handling for gconv.Struct/ghttp.Server; add NewSkip/NewfSkip function for package gerror 2020-04-28 15:04:07 +08:00
9e064e2651 donator updates 2020-04-27 23:34:22 +08:00
8d9dd17eac add Walk function for package gset; improve fields handling feature for package gdb 2020-04-27 21:18:42 +08:00
cf1d3d3d2b improve package gdebug; add more unit testing case for package gdb 2020-04-27 17:56:04 +08:00
9480ffcdc0 improve function SetPath/AddPath for package gview 2020-04-27 17:07:00 +08:00
5db10add4a fix issue in unnacessary quoting of fields in select statement of gdb.Model 2020-04-27 16:30:53 +08:00
fa66bf5d9d improve cache feature of package gdb.Model 2020-04-26 21:31:55 +08:00
f69da3ace1 add function Transaction for package gdb 2020-04-26 17:47:19 +08:00
e01bfa05c3 listening ports change for unit testing cases of ghttp.Server 2020-04-26 17:13:48 +08:00
231238c157 improve parameter handing for ghttp.Request 2020-04-26 17:08:07 +08:00
7edec099ab improve raw request/response content dump for ghttp.Client 2020-04-24 00:00:52 +08:00
83eb8be064 Merge pull request #609 from kirileec/master
add Raw* method in ClientResponse to get request and response string
2020-04-23 22:58:04 +08:00
7af30df494 Merge branch 'master' into master 2020-04-23 22:57:23 +08:00
f026686fda fix issue in dupicated expiration handling in response cookies og ghttp.Client 2020-04-23 21:12:32 +08:00
35a50b9c6c readme update 2020-04-23 21:06:42 +08:00
010e2f951a downgrade the required golang version from v1.13 to v1.11 2020-04-23 20:38:25 +08:00
f7f86ad65a downgrade the required golang version from v1.13 to v1.11 2020-04-23 20:25:59 +08:00
1e19f447d1 improve ghttp.Client in context handling 2020-04-23 20:23:23 +08:00
8cc378331d add one unit testing case for ghttp.Server 2020-04-23 20:10:10 +08:00
4721f68fd8 add performance testing result 2020-04-23 19:51:08 +08:00
0d11c0a1f8 add performance testing result 2020-04-23 19:41:34 +08:00
5076613a8f add performance testing result 2020-04-23 17:25:11 +08:00
c5a44daa65 add performance testing result 2020-04-23 17:23:57 +08:00
520970b71f add performance testing result 2020-04-23 17:19:08 +08:00
ebfb08ee3f add performance testing result 2020-04-23 17:18:15 +08:00
9e38b2cb90 add performance testing result 2020-04-23 17:14:11 +08:00
71b1f00dc5 improve package gdb/gstr/gvalid 2020-04-20 22:36:28 +08:00
59d6830ab1 version update 2020-04-18 13:42:06 +08:00
8779a3f211 add function Walk for package garray; improve comment for package garray 2020-04-18 13:30:49 +08:00
c10149baa0 fix issue in stack trace for package gdebug; improve package gsmtp 2020-04-18 10:17:54 +08:00
4f87668780 improve retry feature for ghttp.Client 2020-04-16 15:43:21 +08:00
63f33d1d8c improve package gdb supporting gtime.Time parameter for Where condition 2020-04-15 18:02:32 +08:00
734aa5a6fe improve create_at,update_at,delete_at feature for package gdb 2020-04-15 12:56:41 +08:00
371aef224d donator updates 2020-04-15 11:41:44 +08:00
362e380ada improve SetConfigWithMap function for package ghttp/glog/gview; reveal some logger functions for default logger of package glog 2020-04-15 11:04:39 +08:00
e995bd8c9a add unit testing cases of https feature for ghttp.Server 2020-04-15 09:55:44 +08:00
81b211dd1a improve select operation details handling for package gdb 2020-04-15 09:37:46 +08:00
0515fc94cb add MapMerge/MapMargeCopy functions for package gutil; improve template view feature for indefinite parameters 2020-04-14 21:11:12 +08:00
46ee070f0a fix issue in package gfsnotify when gset changes 2020-04-14 00:20:39 +08:00
b17e3a6804 improve package gset 2020-04-13 23:44:43 +08:00
9160bee1af change comments 2020-04-11 12:16:53 +08:00
8e6018cfff improve soft deleting feature for package gdb 2020-04-11 10:14:49 +08:00
c08739b5a3 add function Having for gdb.Model 2020-04-11 10:11:52 +08:00
385a503d31 add soft deleting feature, improve chars handling for package gdb 2020-04-11 09:09:25 +08:00
ef286b0c15 add unit testing case for auto time and soft deleting features for package gdb 2020-04-09 22:48:21 +08:00
53aba2d4b8 add unit testing case of cache feature for package gdb 2020-04-09 22:00:02 +08:00
f22da4ba3a improve gconv.MapDeep with anonymous checks for attribute struct field 2020-04-09 15:34:23 +08:00
23c2f12672 improve MapDeep function for package gconv; improve gjson.New function for loading struct parameter 2020-04-09 13:37:27 +08:00
7fd53673ce add automatic time and soft deleting features: create_at/update_at/delete_at for package gdb; improve schema changing feature for package gdb 2020-04-08 21:26:14 +08:00
e64fd088b9 fix when no response 2020-04-08 20:11:06 +08:00
15672e7a09 #591 add Raw* method in ClientResponse to get request and response string 2020-04-08 19:24:03 +08:00
2ea1d2c7b2 update build-in template function substr/strlimit for package gview 2020-04-07 23:53:17 +08:00
90d751f98d add function SubStrRune/StrLimitRune/PosRune/PosIRune/PosRRune/PosRIRune for package gstr; remove unicode support in function SubStr/StrLimit for package gstr 2020-04-07 23:51:48 +08:00
25a91c732c improve String/Map converting for package gconv 2020-04-07 21:29:41 +08:00
01995f5501 improve function Marge for package garray using interface feature; improve slice converting using interface feature for package gconv 2020-04-07 21:25:52 +08:00
68abb3cf3d improve package glist for var initilalization feature 2020-04-07 20:58:58 +08:00
77cc323d0e improve package gset/gmap for initialization 2020-04-07 20:41:49 +08:00
c7a9c03495 improve package garray/gmap for initialization 2020-04-07 20:06:26 +08:00
f7850e3ed3 improve package garray 2020-04-07 11:29:42 +08:00
82125416a2 comment update for package ghttp 2020-04-06 22:31:45 +08:00
2c1e2155e3 improve function Server.Handler for package ghttp 2020-04-06 20:29:35 +08:00
2d30a53c3a remove function From for package gdb; add function g.Table; add ServeHTTP interface implements for ghttp.Server 2020-04-04 22:46:52 +08:00
ccceeae29c change third party package for yaml parsing to gopkg.in/yaml.v3 2020-04-03 19:51:33 +08:00
f22b98456f add default value of MaxActive configuration for package gredis 2020-04-03 15:18:35 +08:00
e7f1bd692b remove Content-Type header set in Response.WriteStatus for package ghttp 2020-04-03 14:16:26 +08:00
f82f7ab199 change default value of safe from false to true for gdb.Model 2020-04-03 10:16:57 +08:00
4d33b527b6 readme update 2020-04-03 09:32:04 +08:00
7bcc596308 add GetVar function for package genv; add DryRun feature for package gdb 2020-04-02 20:52:37 +08:00
be2d4b080e Merge pull request #601 from bdliyq/master
Get ghttp a chance to add custom host.
2020-04-01 19:55:25 +08:00
c96e5f5a9e readme update 2020-04-01 18:08:20 +08:00
3c23766674 readme update 2020-04-01 18:05:17 +08:00
718089fc11 Get ghttp a chance to add custom host. 2020-03-31 23:28:21 +08:00
8ab44dcb44 Get ghttp a chance to add custom host. 2020-03-31 21:50:15 +08:00
992522342c version/readme update 2020-03-30 23:56:26 +08:00
040898cdc3 improve unit testing case for package gmutex 2020-03-30 22:55:03 +08:00
343126ef22 fix usage for garray.PopRand 2020-03-30 20:56:00 +08:00
05760d1eac fix usage for garray.PopRand 2020-03-30 20:47:50 +08:00
c10f73f1f7 add zero time.Time filtering for omitempty feature of gdb.Model 2020-03-30 20:44:36 +08:00
7e0fa8e0cd improve package garray 2020-03-30 20:31:47 +08:00
6fe6218505 README updates 2020-03-29 20:23:10 +08:00
6059782de8 add unit testing case of basic auth for ghttp.Client; remove intlog for New function of package gspath 2020-03-29 19:36:49 +08:00
4844eea0ab add convenience function g.Client for ghttp.Client 2020-03-29 09:52:37 +08:00
8ecd62d3de add example for package gres 2020-03-28 21:32:29 +08:00
4c610b4f58 improve session storage file for ghttp.Server 2020-03-28 20:02:57 +08:00
1932c4ec44 Merge pull request #575 from wenzi1/master
Fix the bug of MSSQL paging
2020-03-28 19:59:31 +08:00
bd2e51ddca improve unit testing case for package glog 2020-03-28 00:47:34 +08:00
ddcb7121c1 improve temporary path producing from gfile.Join to gfile.TempDir 2020-03-28 00:41:12 +08:00
f1f575fd5c improve package gins/gfile/intlog 2020-03-28 00:37:23 +08:00
99adb7cdc4 comment update 2020-03-26 23:48:21 +08:00
6b7ea97777 improve quote handling of table string for package gdb; improve rotation feature for package glog 2020-03-26 22:25:43 +08:00
495b5758ec improve quote handling of table string for package gdb; improve rotation feature for package glog 2020-03-26 22:22:27 +08:00
ba56eb87b1 improve rotation feature for package glog 2020-03-26 20:58:57 +08:00
4258a3bbc9 improve StrToSize function for package gfile 2020-03-26 15:54:57 +08:00
4912331ddc improve mtime feature for gfile; improve rotation feature for glog 2020-03-26 09:29:36 +08:00
e87b7ecf5d improve unit testing case for package gfpool 2020-03-26 08:52:50 +08:00
23bce7bde6 reduce the goroutine count for unit testing cases of package gfpool/glog 2020-03-25 23:49:33 +08:00
926b664615 improve package garray for crossing border handling; improve rotation feature for package glog 2020-03-25 23:36:56 +08:00
fa8257c85b improve ghttp.Client 2020-03-25 17:13:05 +08:00
abb9c88c23 improve ghttp.Client 2020-03-25 15:17:18 +08:00
f89976cad5 improve ghttp.Client 2020-03-25 15:09:13 +08:00
0389778725 improve package glog for file lock 2020-03-25 00:03:52 +08:00
3c36285126 improve Model.Data function for package gdb 2020-03-24 20:58:11 +08:00
75054ee109 fix issue in rebinding feature for grou router of ghttp.Server 2020-03-24 19:48:10 +08:00
8447b1a42b add function LevelStr/StackWithFilter functions for package glog 2020-03-24 00:05:11 +08:00
e5265a1c46 add level string feature for package glog 2020-03-23 22:40:44 +08:00
6e8ef8d0b0 add level string feature for package glog 2020-03-23 22:36:06 +08:00
75c081afc9 fix issue of char '/' in URL.Path handling of ghttp.Server 2020-03-23 20:57:34 +08:00
060fd9eaba improve comment for package gdb 2020-03-23 20:44:20 +08:00
63e5a60344 improve package gdb 2020-03-22 23:26:15 +08:00
75dc1d82c1 example names change 2020-03-22 12:49:46 +08:00
a5e048eb5f example name changes 2020-03-22 12:34:12 +08:00
65bc1d5eb8 comment update for package gjson 2020-03-22 09:24:45 +08:00
bfa64705b5 update comment for package gsession 2020-03-22 00:15:59 +08:00
17aea8d7d4 improve unit testing cases by changing creating testdata path using gdebug.TestdataPath function 2020-03-21 23:47:33 +08:00
a6a01fd7f2 improve template cache for ParseContent function of package gview 2020-03-21 23:42:34 +08:00
41a9e91b4c improve example for package gpage 2020-03-21 23:13:31 +08:00
e2c1e11f95 improve package gjson 2020-03-21 21:32:02 +08:00
c2966817ce improve function gdebug.TestDataPath and update all usage codes 2020-03-21 19:41:05 +08:00
16958413bb improve autoencode feature for package gview 2020-03-21 19:31:58 +08:00
c0a0913d4b add more unit testing case for template feature of ghttp.Server 2020-03-21 13:45:33 +08:00
6d47810782 improve context feature for ghttp.Request; improve comment for package gjson 2020-03-21 13:32:43 +08:00
7a9ea2e546 improve context feature for ghttp.Request 2020-03-20 23:22:32 +08:00
7881b2dee4 improve unit testing cases 2020-03-20 22:34:56 +08:00
5f223ef049 Merge pull request #4 from gogf/master
update
2020-03-20 10:06:50 +08:00
e57942b374 improve unit testing cases 2020-03-20 08:56:17 +08:00
f18e6f078c improve unit testing cases 2020-03-20 08:49:40 +08:00
f667cbc2a2 Fix the bug of MSSQL paging 2020-03-20 00:33:20 +08:00
07e65c14a9 improve unit testing cases 2020-03-19 23:53:03 +08:00
0b6d04485e improve unit testing cases 2020-03-19 22:56:12 +08:00
36401a063d improve gutil.Dump, improve sqlite file searching when opening db file 2020-03-19 13:38:42 +08:00
849e7370d1 improve gutil.Dump, improve sqlite file searching when opening db file 2020-03-19 11:37:31 +08:00
f01dca0895 version updates 2020-03-17 22:36:05 +08:00
55137b2aa3 README, DONATOR updates 2020-03-17 22:35:09 +08:00
22540921b3 improve codes typing for package package gvalid 2020-03-17 22:23:29 +08:00
6174097a07 Merge pull request #3 from gogf/master
update
2020-03-17 22:11:51 +08:00
52de11b1fe Merge pull request #564 from arieslee/master 2020-03-17 22:08:31 +08:00
5a646179ad fix issue in limit...offset statement of postgresql for packagegdb 2020-03-17 21:38:49 +08:00
33ae93e050 improve CORS feature for ghttp.Server 2020-03-17 17:46:43 +08:00
f3d859159d improve router group for duplicated router registering for package ghttp.Server 2020-03-17 14:48:52 +08:00
4fb01e68f7 移除字符串ip地址与Long类型互转的方法,修改中文长度校验的方法 2020-03-17 14:26:36 +08:00
2812a247aa 添加验证中英文混合字符串长度的判断规则,按utf8计算,一个中文算一个字符,cn-length,cn-min-length,cn-max-length 2020-03-17 11:19:43 +08:00
2b46e765c4 change function time.Duration.Milliseconds to time.Duration.Nanoseconds for compatibility of Golang version < 1.13 2020-03-16 23:03:37 +08:00
c7f911cae2 change function time.Duration.Milliseconds to time.Duration.Nanoseconds for compatibility of Golang version < 1.13 2020-03-16 23:03:35 +08:00
9f0548c03d improve testdata directory retrieving for unit testing cases 2020-03-16 22:47:39 +08:00
c578df06a3 fix issue in unit testing case of package gfile 2020-03-16 20:51:19 +08:00
8ed3cf9c97 fix issue in unit testing case of package gcdg 2020-03-16 20:46:03 +08:00
2438f565e9 添加字符串ip地址与Long类型互转的方法 2020-03-16 11:18:06 +08:00
8230c72ec6 improve file uploading feature for ghttp.Request 2020-03-15 20:11:38 +08:00
d716037caa improve package gcfg adding default configuration file searching for instance 2020-03-15 19:56:07 +08:00
855a4ddb2c add file rotation feature for package glog; improve gpool/gfpool; fix issue in gfile.MTimeMillisecond 2020-03-15 19:32:29 +08:00
74be9fac18 add file rotation feature for package glog; improve gpool/gfpool; fix issue in gfile.MTimeMillisecond 2020-03-15 19:32:26 +08:00
e9fba5a166 readme updates 2020-03-14 17:15:25 +08:00
0a92df691b improve package gpool/gfpool; donator updates 2020-03-14 17:12:44 +08:00
e513cd10ed add Lock* functions for gdb.Model and improve Data/Where functions for gdb.Model 2020-03-13 17:21:30 +08:00
b702d98700 version updates 2020-03-12 10:05:38 +08:00
99f1d9d0ed improve package gudp 2020-03-11 23:59:43 +08:00
707b08c585 improve package gudp 2020-03-11 23:56:58 +08:00
f44c19868c improve package gudp 2020-03-11 23:54:35 +08:00
13ab139afc add more unit testing case for package gdb 2020-03-11 23:24:19 +08:00
cacb2f142b Merge pull request #548 from wenzi1/master
add Tables and TableFields method for sqlite
2020-03-11 23:18:59 +08:00
11f0317e92 add Array feature for package gdb 2020-03-11 23:17:41 +08:00
9a667c8803 add Tables and TableFields method for sqlite 2020-03-11 22:45:38 +08:00
c1cce17934 add unit testing cases for gudp 2020-03-11 16:08:17 +08:00
5a92d7de0d fix issue in router group registering for controller 2020-03-11 15:51:24 +08:00
53bf378868 Merge pull request #550 from fulltimelove/master 2020-03-11 15:07:30 +08:00
cd7c45c00c improve default connection pool configuration for gredis 2020-03-11 14:35:23 +08:00
f13a5ad82e 分组路由对象绑定时支持多方法绑定 2020-03-11 10:10:00 +08:00
2e9be609c8 fix issue in unit testing of gins 2020-03-11 09:22:13 +08:00
2f2f6e1ffe add Tables and TableFields method 2020-03-11 00:29:25 +08:00
f3bd2b67f7 change attribute Context to context.Context for ghttp.Request 2020-03-10 20:45:22 +08:00
645cecdffb improve template view instance initialization for instance of ghttp.Server 2020-03-10 20:13:36 +08:00
22e9965629 improve template view instance initialization for instance of ghttp.Server 2020-03-10 08:57:37 +08:00
24ea9f9245 Merge pull request #2 from gogf/master
update
2020-03-09 23:35:59 +08:00
9dbde6e8f1 change function HandleSqlBeforeExec to HandleSqlBeforeCommit for package gdb 2020-03-09 22:00:01 +08:00
fe0b34544d fix missing of pgsql driver support for package gdb 2020-03-09 21:56:53 +08:00
5e489d59b4 improve HandleSqlBeforeExec function for package gdb 2020-03-09 21:53:58 +08:00
61f49574a9 fix issue in unit testing case for gparser 2020-03-09 20:56:10 +08:00
2fabcb62a8 remove binary from git 2020-03-09 19:48:51 +08:00
3bc3b652c1 improve unit testing case for gjson 2020-03-09 09:00:38 +08:00
042a6f12f5 add map conversion support for result of HGetAll for package gredis 2020-03-08 23:16:06 +08:00
5acce82e63 add slice support for gconv.Map 2020-03-08 23:09:37 +08:00
4732bf46ad add Context map for internal context workflow parameter exchanges for ghttp.Request 2020-03-08 22:53:20 +08:00
5bed5a1532 improve unit testing case for driver feature og package gdb 2020-03-08 12:18:07 +08:00
5b7576430f improve unit testing case for driver feature og package gdb 2020-03-08 12:16:44 +08:00
356f4cd701 improve unit testing case for driver feature og package gdb 2020-03-08 12:04:24 +08:00
c444630d1e add workaround for package gdb for json infinite loop bug of Golang version < v1.14 2020-03-08 11:56:19 +08:00
8e40cded42 add custom driver feature for package gdb 2020-03-08 11:03:18 +08:00
0e52d467d3 improving package gdb 2020-03-08 00:17:42 +08:00
6665d62e7e improve package gfile 2020-03-07 20:28:00 +08:00
5bdf1a71b8 improve uploading file feature for ghttp.Server 2020-03-07 20:20:52 +08:00
a34ca0ff4b improve uploading file feature for ghttp.Server; improve package gfile/gstr/gdebug 2020-03-07 19:31:33 +08:00
7f0163d958 improve gconv.Struct* functions for custom types conversion 2020-03-06 23:22:08 +08:00
31f19b0eee improve package gcompress 2020-03-06 15:38:32 +08:00
93d0760898 add GetPage function for ghttp.Request 2020-03-06 11:01:03 +08:00
4863e7a6ae Merge pull request #529 from wenzi1/master 2020-03-05 22:02:16 +08:00
a161b44cc7 improve package gpage 2020-03-05 18:07:07 +08:00
7072244420 improve comment for ghttp.Server 2020-03-05 16:08:55 +08:00
f68b66e606 update comment for ghttp.Server 2020-03-04 23:32:27 +08:00
4e7c6c1fb4 improve CORS feature for ghttp.Server 2020-03-04 22:52:56 +08:00
d8a7e36478 improve router feature for ghttp.Server 2020-03-04 17:29:23 +08:00
8971ad8445 Add tables method of MSSQL, Oracle and PgSQL 2020-03-02 23:41:33 +08:00
270af8accb Merge pull request #1 from gogf/master
update
2020-02-29 22:46:00 +08:00
b0ef63fc9d improve bindArgsToQuery for surpport for pgsql/mssql/oracle for package gdb 2020-02-29 19:55:53 +08:00
6e1f8c3cfc version updates 2020-02-29 08:54:18 +08:00
e58d7e8dda add internal log for gi18n; improve unit testing case for ghttp.Server 2020-02-28 23:00:05 +08:00
3a3384cf06 Merge branch 'master' of https://github.com/gogf/gf 2020-02-27 17:09:44 +08:00
ef2a9f6fd1 fix issue in log paatern for ghttp.Server 2020-02-27 17:09:12 +08:00
63f756f731 Merge pull request #514 from kevinlincg/master
fix typo in gpool_bench_test.go
2020-02-26 23:38:33 +08:00
bb1c27c36a add more unit testing cases for glog 2020-02-26 23:26:24 +08:00
87cd0703c0 change internal log prefix from '[GF]' to '[INTE]' 2020-02-26 11:57:26 +08:00
6317d9de53 add ci for golang v1.14 2020-02-26 11:54:46 +08:00
7acf16fdba add UploadFile feature for ghttp.Server 2020-02-26 01:01:28 +08:00
a52b454d3e add UploadFile feature for ghttp.Server 2020-02-26 00:48:27 +08:00
816e075c52 add more unit testing cases for package garray 2020-02-25 23:19:37 +08:00
9882b361a8 add more unit testing cases for package gstr 2020-02-25 23:01:51 +08:00
4415dcf1c1 add HasPrefix/HasSuffix for package gstr 2020-02-25 21:03:07 +08:00
42fd583bfd add more inernal logging points for core components 2020-02-24 21:09:19 +08:00
c70bc7c96a improve pakage g/gins 2020-02-23 20:25:55 +08:00
02bd780a33 readme and donator update 2020-02-22 17:06:58 +08:00
24a2192ce2 README updates 2020-02-22 15:36:31 +08:00
d8ef8a1f5d add gf.debug options and GF_DEBUG env control params for internal logging feature 2020-02-22 14:51:44 +08:00
745a913cfb add FilterNil/FilterEmpty functions for package garray; add FieldsStr/FieldsExStr for gdb.Model 2020-02-22 14:26:36 +08:00
13dba407a2 fix parameter issue in benchmark of internal/rwmutex 2020-02-21 13:15:40 +08:00
34e7c5f809 rename grand.Str to grand.S; add different function Str for grand 2020-02-21 00:01:27 +08:00
d570624caa fix typo in gpool_bench_test.go 2020-02-20 09:01:09 +08:00
f18312419b improve CORS feature for ghttp.Server 2020-02-16 23:18:37 +08:00
89f869dd44 remove internal logging for gsession.StorageFile; improve example codes for CORS feature of ghttp.Server 2020-02-16 23:00:42 +08:00
20b64507b1 improve string conversion for gtime.Time 2020-02-16 22:39:12 +08:00
7443246e05 add gtime.TimeWrapper 2020-02-16 18:07:05 +08:00
f9e7823c14 improve configuration for package gdb 2020-02-16 16:36:39 +08:00
52943b283c go.mod updates; add search path configuration in file for package ghttp.Server 2020-02-16 16:34:30 +08:00
36403fdc08 improve configuration for mssql 2020-02-16 16:25:03 +08:00
0317f6812e add more unit testing cases for gtime 2020-02-16 15:11:21 +08:00
5169137069 improve unit testing case for CORS feature for package ghttp 2020-02-16 13:32:06 +08:00
7d9bccf912 README updates 2020-02-15 12:00:20 +08:00
14f56ea18f donator updates 2020-02-14 22:21:53 +08:00
1736d271d2 add more unit testing case 2020-02-14 22:13:41 +08:00
19755ad233 improve gcfg 2020-02-14 21:57:35 +08:00
cfdd043e4e add OctStr function for gstr 2020-02-12 10:48:15 +08:00
78917ed5cb comment updates for package ghttp 2020-02-11 10:00:10 +08:00
88684ca00a add panic if internal watcher creation fails for gfsnotify; improve codes and change comment from chinese to english for gdb 2020-02-10 20:37:53 +08:00
784983806a add InserIgnore feature for package gdb 2020-02-08 23:46:10 +08:00
cdb3b94e22 add NewWithTag function for gjson/gparser 2020-02-08 14:07:32 +08:00
83dcc4a5e0 fix issue for overwriting the route item if allowed 2020-02-08 11:17:09 +08:00
a6c0b281a3 add struct support for where condition statement of gdb 2020-02-07 20:58:47 +08:00
3120f24553 add struct support for where condition statement og gdb 2020-02-07 19:44:11 +08:00
ac9be6134b add global schema access support for mssql in gdb 2020-02-07 17:21:05 +08:00
4c1b4f7858 change time measuing unit from microtime to millitime for ghttp.Request; change graceful reload feature from true to false in default 2020-02-07 16:29:14 +08:00
1e45bf93d8 remove error printing when decoding error in communication feature of gproc 2020-02-06 19:21:17 +08:00
e8dd3979b6 add more unit testing cases for ghttp/gview 2020-02-06 15:17:10 +08:00
374ee4c0ea improve ghttp.Request for making the request body reusable for multiple times 2020-02-06 11:22:36 +08:00
95411aff77 improve ghttp.Request for making the request body reusable for multiple times 2020-02-06 11:14:38 +08:00
1999ef95c1 fix issue in gconv.Struct* functions panic when converting attribute value is nil 2020-02-05 22:06:24 +08:00
b15075fdfe fix issue in gconv.Struct* functions panic when converting attribute value is nil 2020-02-05 22:02:49 +08:00
4d2b244319 fix issue in gres.UnpackContent; fix issue in gtime.NewFromTimeStamp 2020-02-04 17:09:18 +08:00
4c3af63076 improve time string parsing for invalid datetime 2020-02-01 20:14:24 +08:00
91bbff6ced architecture updates 2020-01-23 15:04:12 +08:00
26aab44ec8 fix issue in char '-' support for parameter retrieving for ghttp.Request 2020-01-22 20:28:42 +08:00
2e10ce421b improve plugin feature 2020-01-21 22:18:49 +08:00
8eda69b11e improve the plugin feature for ghttp.Server 2020-01-21 17:18:03 +08:00
7d7b242968 Merge branch 'master' of https://github.com/gogf/gf 2020-01-21 15:42:19 +08:00
202419202f improve logger feautre, add unit testing cases for ghttp.Server; add SetDefaultLogger function for glog 2020-01-21 15:42:08 +08:00
55078beed1 Merge pull request #484 from chikaku/remove_redundant
Remove redundant code in gsession
2020-01-21 15:40:35 +08:00
d9f4e6eaa6 remove redundant code in gsession 2020-01-21 14:55:08 +08:00
2ba0913bea comment update for gtimer 2020-01-21 14:46:23 +08:00
8f2dcf21ff improve gconv.Map 2020-01-20 21:25:55 +08:00
01b06e0745 improve ghttp.BuildParams 2020-01-20 20:32:39 +08:00
665b5960c8 fix issue in minus number converting for gconv.Int 2020-01-20 20:18:24 +08:00
eb6a7a4728 add function UnmarshalValue feature for package garray/gmap/gset/gtype/gvar/gjson/gconv 2020-01-20 19:56:42 +08:00
7df53ff55e rename all timestamp function names from *Second to Timestamp* 2020-01-20 14:14:11 +08:00
8021f39710 version updates 2020-01-19 21:21:41 +08:00
f2af08270b improve gproc 2020-01-19 20:42:21 +08:00
c2f028848c readme updates 2020-01-18 22:35:07 +08:00
d9c7224861 readme updates 2020-01-18 22:21:37 +08:00
f59a1ada88 improve static service feature, add plugin feature for ghttp.Server 2020-01-17 21:12:52 +08:00
705ab1d33f improve garray; add RemoveValue function for garray 2020-01-17 19:48:50 +08:00
1669 changed files with 138710 additions and 67099 deletions

View File

@ -1,46 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/garray"
)
func main() {
// Create a int array, which is concurrent-unsafe in default.
a := garray.NewIntArray()
// Appending items.
for i := 0; i < 10; i++ {
a.Append(i)
}
// Get the length of the array.
fmt.Println(a.Len())
// Get the slice of the array.
fmt.Println(a.Slice())
// Get the item of specified index.
fmt.Println(a.Get(6))
// Insert after/before specified index.
a.InsertAfter(9, 11)
a.InsertBefore(10, 10)
fmt.Println(a.Slice())
a.Set(0, 100)
fmt.Println(a.Slice())
// Searching the item and returning the index.
fmt.Println(a.Search(5))
// Remove item of specified index.
a.Remove(0)
fmt.Println(a.Slice())
// Clearing the array.
fmt.Println(a.Slice())
a.Clear()
fmt.Println(a.Slice())
}

View File

@ -1,22 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/garray"
)
func main() {
type Student struct {
Id int
Name string
Scores *garray.IntArray
}
s := Student{
Id: 1,
Name: "john",
Scores: garray.NewIntArrayFrom([]int{100, 99, 98}),
}
b, _ := json.Marshal(s)
fmt.Println(string(b))
}

View File

@ -1,19 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/garray"
)
func main() {
b := []byte(`{"Id":1,"Name":"john","Scores":[100,99,98]}`)
type Student struct {
Id int
Name string
Scores *garray.IntArray
}
s := Student{}
json.Unmarshal(b, &s)
fmt.Println(s)
}

View File

@ -1,40 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/garray"
)
func main() {
// 自定义排序数组,降序排序(SortedIntArray管理的数据是升序)
a := garray.NewSortedArray(func(v1, v2 interface{}) int {
if v1.(int) < v2.(int) {
return 1
}
if v1.(int) > v2.(int) {
return -1
}
return 0
})
// 添加数据
a.Add(2)
a.Add(3)
a.Add(1)
fmt.Println(a.Slice())
// 添加重复数据
a.Add(3)
fmt.Println(a.Slice())
// 检索数据,返回最后对比的索引位置,检索结果
// 检索结果0: 匹配; <0:参数小于对比值; >0:参数大于对比值
fmt.Println(a.Search(1))
// 设置不可重复
a.SetUnique(true)
fmt.Println(a.Slice())
a.Add(1)
fmt.Println(a.Slice())
}

View File

@ -1,23 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/garray"
)
func main() {
array := garray.NewSortedStrArray()
array.Add("9")
array.Add("8")
array.Add("7")
array.Add("6")
array.Add("5")
array.Add("4")
array.Add("3")
array.Add("2")
array.Add("1")
fmt.Println(array.Slice())
// output:
// [1 2 3 4 5 6 7 8 9]
}

View File

@ -1,22 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/glist"
)
func main() {
l := glist.New()
// Push
l.PushBack(1)
l.PushBack(2)
e := l.PushFront(0)
// Insert
l.InsertBefore(e, -1)
l.InsertAfter(e, "a")
fmt.Println(l)
// Pop
fmt.Println(l.PopFront())
fmt.Println(l.PopBack())
fmt.Println(l)
}

View File

@ -1,23 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/glist"
"github.com/gogf/gf/frame/g"
)
func main() {
type Student struct {
Id int
Name string
Scores *glist.List
}
s := Student{
Id: 1,
Name: "john",
Scores: glist.NewFrom(g.Slice{100, 99, 98}),
}
b, _ := json.Marshal(s)
fmt.Println(string(b))
}

View File

@ -1,19 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/glist"
)
func main() {
b := []byte(`{"Id":1,"Name":"john","Scores":[100,99,98]}`)
type Student struct {
Id int
Name string
Scores *glist.List
}
s := Student{}
json.Unmarshal(b, &s)
fmt.Println(s)
}

View File

@ -1,74 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gmap"
)
func main() {
// 创建一个默认的gmap对象
// 默认情况下该gmap对象不支持并发安全特性
// 初始化时可以给定true参数开启并发安全特性用以并发安全场景。
m := gmap.New()
// 设置键值对
for i := 0; i < 10; i++ {
m.Set(i, i)
}
// 查询大小
fmt.Println(m.Size())
// 批量设置键值对(不同的数据类型对象参数不同)
m.Sets(map[interface{}]interface{}{
10: 10,
11: 11,
})
fmt.Println(m.Size())
// 查询是否存在
fmt.Println(m.Contains(1))
// 查询键值
fmt.Println(m.Get(1))
// 删除数据项
m.Remove(9)
fmt.Println(m.Size())
// 批量删除
m.Removes([]interface{}{10, 11})
fmt.Println(m.Size())
// 当前键名列表(随机排序)
fmt.Println(m.Keys())
// 当前键值列表(随机排序)
fmt.Println(m.Values())
// 查询键名,当键值不存在时,写入给定的默认值
fmt.Println(m.GetOrSet(100, 100))
// 删除键值对,并返回对应的键值
fmt.Println(m.Remove(100))
// 遍历map
m.Iterator(func(k interface{}, v interface{}) bool {
fmt.Printf("%v:%v ", k, v)
return true
})
// 自定义写锁操作
m.LockFunc(func(m map[interface{}]interface{}) {
m[99] = 99
})
// 自定义读锁操作
m.RLockFunc(func(m map[interface{}]interface{}) {
fmt.Println(m[99])
})
// 清空map
m.Clear()
// 判断map是否为空
fmt.Println(m.IsEmpty())
}

View File

@ -1,19 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/container/gmap"
)
func main() {
m := gmap.New()
m.Sets(g.MapAnyAny{
"name": "john",
"score": 100,
})
b, _ := json.Marshal(m)
fmt.Println(string(b))
}

View File

@ -1,14 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gmap"
)
func main() {
m := gmap.Map{}
s := []byte(`{"name":"john","score":100}`)
json.Unmarshal(s, &m)
fmt.Println(m.Map())
}

View File

@ -1,26 +0,0 @@
package main
import (
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/frame/g"
)
func main() {
m1 := gmap.New(true)
m1.Set("1", "1")
m2 := m1.Map()
m2["2"] = "2"
g.Dump(m1.Clone())
g.Dump(m2)
//output:
//{
// "1": "1"
//}
//
//{
// "1": "1",
// "2": "2"
//}
}

View File

@ -1,31 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gutil"
)
func main() {
array := g.Slice{2, 3, 1, 5, 4, 6, 8, 7, 9}
hashMap := gmap.New()
linkMap := gmap.NewListMap()
treeMap := gmap.NewTreeMap(gutil.ComparatorInt)
for _, v := range array {
hashMap.Set(v, v)
}
for _, v := range array {
linkMap.Set(v, v)
}
for _, v := range array {
treeMap.Set(v, v)
}
fmt.Println("HashMap Keys:", hashMap.Keys())
fmt.Println("HashMap Values:", hashMap.Values())
fmt.Println("LinkMap Keys:", linkMap.Keys())
fmt.Println("LinkMap Values:", linkMap.Values())
fmt.Println("TreeMap Keys:", treeMap.Keys())
fmt.Println("TreeMap Values:", treeMap.Values())
}

View File

@ -1,63 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gmap"
"github.com/gogf/gf/util/gutil"
)
func main() {
m := gmap.NewTreeMap(gutil.ComparatorInt)
// 设置键值对
for i := 0; i < 10; i++ {
m.Set(i, i)
}
// 查询大小
fmt.Println(m.Size())
// 批量设置键值对(不同的数据类型对象参数不同)
m.Sets(map[interface{}]interface{}{
10: 10,
11: 11,
})
fmt.Println(m.Size())
// 查询是否存在
fmt.Println(m.Contains(1))
// 查询键值
fmt.Println(m.Get(1))
// 删除数据项
m.Remove(9)
fmt.Println(m.Size())
// 批量删除
m.Removes([]interface{}{10, 11})
fmt.Println(m.Size())
// 当前键名列表(随机排序)
fmt.Println(m.Keys())
// 当前键值列表(随机排序)
fmt.Println(m.Values())
// 查询键名,当键值不存在时,写入给定的默认值
fmt.Println(m.GetOrSet(100, 100))
// 删除键值对,并返回对应的键值
fmt.Println(m.Remove(100))
// 遍历map
m.IteratorAsc(func(k interface{}, v interface{}) bool {
fmt.Printf("%v:%v ", k, v)
return true
})
fmt.Println()
// 清空map
m.Clear()
// 判断map是否为空
fmt.Println(m.IsEmpty())
}

View File

@ -1,26 +0,0 @@
package main
import (
"fmt"
"time"
"github.com/gogf/gf/container/gpool"
)
func main() {
// 创建一个对象池过期时间为1000毫秒
p := gpool.New(1000, nil)
// 从池中取一个对象返回nil及错误信息
fmt.Println(p.Get())
// 丢一个对象到池中
p.Put(1)
// 重新从池中取一个对象返回1
fmt.Println(p.Get())
// 等待1秒后重试发现对象已过期返回nil及错误信息
time.Sleep(time.Second)
fmt.Println(p.Get())
}

View File

@ -1,33 +0,0 @@
package main
import (
"fmt"
"time"
"github.com/gogf/gf/container/gpool"
"github.com/gogf/gf/net/gtcp"
"github.com/gogf/gf/os/glog"
)
func main() {
// 创建对象复用池对象过期时间为3000毫秒并给定创建及销毁方法
p := gpool.New(3000, func() (interface{}, error) {
return gtcp.NewConn("www.baidu.com:80")
}, func(i interface{}) {
glog.Println("expired")
i.(*gtcp.Conn).Close()
})
conn, err := p.Get()
if err != nil {
panic(err)
}
result, err := conn.(*gtcp.Conn).SendRecv([]byte("HEAD / HTTP/1.1\n\n"), -1)
if err != nil {
panic(err)
}
fmt.Println(string(result))
// 丢回池中以便重复使用
p.Put(conn)
// 等待一定时间观察过期方法调用
time.Sleep(4 * time.Second)
}

View File

@ -1,34 +0,0 @@
package main
import (
"fmt"
"time"
"github.com/gogf/gf/container/gqueue"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/os/gtimer"
)
func main() {
q := gqueue.New()
// 数据生产者每隔1秒往队列写数据
gtimer.SetInterval(time.Second, func() {
v := gtime.Now().String()
q.Push(v)
fmt.Println("Push:", v)
})
// 3秒后关闭队列
gtimer.SetTimeout(3*time.Second, func() {
q.Close()
})
// 消费者,不停读取队列数据并输出到终端
for {
if v := q.Pop(); v != nil {
fmt.Println(" Pop:", v)
} else {
break
}
}
}

View File

@ -1,28 +0,0 @@
package main
import (
"fmt"
"time"
"github.com/gogf/gf/container/gqueue"
"github.com/gogf/gf/os/gtimer"
)
func main() {
q := gqueue.New()
// 数据生产者每隔1秒往队列写数据
gtimer.SetInterval(time.Second, func() {
for i := 0; i < 10; i++ {
q.Push(i)
}
})
// 消费者,不停读取队列数据并输出到终端
for {
if v := q.Pop(); v != nil {
fmt.Println(" Pop:", v)
} else {
break
}
}
}

View File

@ -1,30 +0,0 @@
package main
import (
"fmt"
"time"
"github.com/gogf/gf/container/gqueue"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/os/gtimer"
)
func main() {
queue := gqueue.New()
// 数据生产者每隔1秒往队列写数据
gtimer.SetInterval(time.Second, func() {
queue.Push(gtime.Now().String())
})
// 消费者,不停读取队列数据并输出到终端
for {
select {
case v := <-queue.C:
if v != nil {
fmt.Println(v)
} else {
return
}
}
}
}

View File

@ -1,28 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gring"
)
func main() {
r1 := gring.New(10)
for i := 0; i < 5; i++ {
r1.Set(i).Next()
}
fmt.Println("Len:", r1.Len())
fmt.Println("Cap:", r1.Cap())
fmt.Println(r1.SlicePrev())
fmt.Println(r1.SliceNext())
r2 := gring.New(10)
for i := 0; i < 10; i++ {
r2.Set(i).Next()
}
fmt.Println("Len:", r2.Len())
fmt.Println("Cap:", r2.Cap())
fmt.Println(r2.SlicePrev())
fmt.Println(r2.SliceNext())
}

View File

@ -1,58 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gring"
)
type Player struct {
position int // 位置
alive bool // 是否存活
}
const (
playerCount = 41 // 玩家人数
startPos = 1 // 开始报数位置
)
var (
deadline = 3
)
func main() {
// 关闭并发安全,当前场景没有必要
r := gring.New(playerCount, false)
// 设置所有玩家初始值
for i := 1; i <= playerCount; i++ {
r.Put(&Player{i, true})
}
// 如果开始报数的位置不为1则设置开始位置
if startPos > 1 {
r.Move(startPos - 1)
}
counter := 1 // 报数从1开始因为下面的循环从第二个开始计算
deadCount := 0 // 死亡人数初始值为0
// 直到所有人都死亡,否则循环一直执行
for deadCount < playerCount {
// 跳到下一个人
r.Next()
// 如果是活着的人,则报数
if r.Val().(*Player).alive {
counter++
}
// 如果报数为deadline则此人淘汰出局
if counter == deadline {
r.Val().(*Player).alive = false
fmt.Printf("Player %d died!\n", r.Val().(*Player).position)
deadCount++
counter = 0
}
}
}

View File

@ -1,53 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gset"
)
func main() {
// 创建一个非并发安全的集合对象
s := gset.New(true)
// 添加数据项
s.Add(1)
// 批量添加数据项
s.Add([]interface{}{1, 2, 3}...)
// 集合数据项大小
fmt.Println(s.Size())
// 集合中是否存在指定数据项
fmt.Println(s.Contains(2))
// 返回数据项slice
fmt.Println(s.Slice())
// 删除数据项
s.Remove(3)
// 遍历数据项
s.Iterator(func(v interface{}) bool {
fmt.Println("Iterator:", v)
return true
})
// 将集合转换为字符串
fmt.Println(s.String())
// 并发安全写锁操作
s.LockFunc(func(m map[interface{}]struct{}) {
m[4] = struct{}{}
})
// 并发安全读锁操作
s.RLockFunc(func(m map[interface{}]struct{}) {
fmt.Println(m)
})
// 清空集合
s.Clear()
fmt.Println(s.Size())
}

View File

@ -1,23 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gset"
"github.com/gogf/gf/frame/g"
)
func main() {
s1 := gset.NewFrom(g.Slice{1, 2, 3})
s2 := gset.NewFrom(g.Slice{4, 5, 6})
s3 := gset.NewFrom(g.Slice{1, 2, 3, 4, 5, 6, 7})
// 交集
fmt.Println(s3.Intersect(s1).Slice())
// 差集
fmt.Println(s3.Diff(s1).Slice())
// 并集
fmt.Println(s1.Union(s2).Slice())
// 补集
fmt.Println(s1.Complement(s3).Slice())
}

View File

@ -1,22 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gset"
)
func main() {
type Student struct {
Id int
Name string
Scores *gset.IntSet
}
s := Student{
Id: 1,
Name: "john",
Scores: gset.NewIntSetFrom([]int{100, 99, 98}),
}
b, _ := json.Marshal(s)
fmt.Println(string(b))
}

View File

@ -1,19 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gset"
)
func main() {
b := []byte(`{"Id":1,"Name":"john","Scores":[100,99,98]}`)
type Student struct {
Id int
Name string
Scores *gset.IntSet
}
s := Student{}
json.Unmarshal(b, &s)
fmt.Println(s)
}

View File

@ -1,29 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gtree"
"github.com/gogf/gf/util/gutil"
)
func main() {
tree := gtree.NewAVLTree(gutil.ComparatorInt)
for i := 0; i < 10; i++ {
tree.Set(i, i*10)
}
// 打印树形
tree.Print()
// 前序遍历
fmt.Println("ASC:")
tree.IteratorAsc(func(key, value interface{}) bool {
fmt.Println(key, value)
return true
})
// 后续遍历
fmt.Println("DESC:")
tree.IteratorDesc(func(key, value interface{}) bool {
fmt.Println(key, value)
return true
})
}

View File

@ -1,22 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gtree"
)
func main() {
tree := gtree.NewBTree(10, func(v1, v2 interface{}) int {
return v1.(int) - v2.(int)
})
for i := 0; i < 20; i++ {
tree.Set(i, i*10)
}
fmt.Println(tree.String())
tree.IteratorDesc(func(key, value interface{}) bool {
fmt.Println(key, value)
return true
})
}

View File

@ -1,63 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gtree"
"github.com/gogf/gf/util/gutil"
)
func main() {
m := gtree.NewRedBlackTree(gutil.ComparatorInt)
// 设置键值对
for i := 0; i < 10; i++ {
m.Set(i, i*10)
}
// 查询大小
fmt.Println(m.Size())
// 批量设置键值对(不同的数据类型对象参数不同)
m.Sets(map[interface{}]interface{}{
10: 10,
11: 11,
})
fmt.Println(m.Size())
// 查询是否存在
fmt.Println(m.Contains(1))
// 查询键值
fmt.Println(m.Get(1))
// 删除数据项
m.Remove(9)
fmt.Println(m.Size())
// 批量删除
m.Removes([]interface{}{10, 11})
fmt.Println(m.Size())
// 当前键名列表(随机排序)
fmt.Println(m.Keys())
// 当前键值列表(随机排序)
fmt.Println(m.Values())
// 查询键名,当键值不存在时,写入给定的默认值
fmt.Println(m.GetOrSet(100, 100))
// 删除键值对,并返回对应的键值
fmt.Println(m.Remove(100))
// 遍历map
m.IteratorAsc(func(k interface{}, v interface{}) bool {
fmt.Printf("%v:%v ", k, v)
return true
})
fmt.Println()
// 清空map
m.Clear()
// 判断map是否为空
fmt.Println(m.IsEmpty())
}

View File

@ -1,17 +0,0 @@
package main
import (
"github.com/gogf/gf/container/gtree"
)
func main() {
tree := gtree.NewRedBlackTree(func(v1, v2 interface{}) int {
return v1.(int) - v2.(int)
})
for i := 0; i < 10; i++ {
tree.Set(i, i)
}
tree.Print()
tree.Flip()
tree.Print()
}

View File

@ -1,21 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/gtype"
)
func main() {
// 创建一个Int型的并发安全基本类型对象
i := gtype.NewInt()
// 设置值
i.Set(10)
// 获取值
fmt.Println(i.Val())
// (整型/浮点型有效)数值 增加/删除 delta
fmt.Println(i.Add(-1))
}

View File

@ -1,22 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gtype"
)
func main() {
type Student struct {
Id *gtype.Int
Name *gtype.String
Scores *gtype.Interface
}
s := Student{
Id: gtype.NewInt(1),
Name: gtype.NewString("john"),
Scores: gtype.NewInterface([]int{100, 99, 98}),
}
b, _ := json.Marshal(s)
fmt.Println(string(b))
}

View File

@ -1,19 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/container/gtype"
)
func main() {
b := []byte(`{"Id":1,"Name":"john","Scores":[100,99,98]}`)
type Student struct {
Id *gtype.Int
Name *gtype.String
Scores *gtype.Interface
}
s := Student{}
json.Unmarshal(b, &s)
fmt.Println(s)
}

View File

@ -1,22 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
type Student struct {
Id *g.Var
Name *g.Var
Scores *g.Var
}
s := Student{
Id: g.NewVar(1),
Name: g.NewVar("john"),
Scores: g.NewVar([]int{100, 99, 98}),
}
b, _ := json.Marshal(s)
fmt.Println(string(b))
}

View File

@ -1,19 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
b := []byte(`{"Id":1,"Name":"john","Scores":[100,99,98]}`)
type Student struct {
Id *g.Var
Name *g.Var
Scores *g.Var
}
s := Student{}
json.Unmarshal(b, &s)
fmt.Println(s)
}

View File

@ -1,33 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
var v g.Var
v.Set("123")
fmt.Println(v.Val())
// 基本类型转换
fmt.Println(v.Int())
fmt.Println(v.Uint())
fmt.Println(v.Float64())
// slice转换
fmt.Println(v.Ints())
fmt.Println(v.Floats())
fmt.Println(v.Strings())
// struct转换
type Score struct {
Value int
}
s := new(Score)
v.Struct(s)
fmt.Println(s)
}

View File

@ -1,8 +0,0 @@
[database]
type = "mssql"
host = "127.0.0.1"
port = "1451"
user = "sa"
pass = "eno@123"
name = "frpc"

View File

@ -1,14 +0,0 @@
package main
import (
"fmt"
_ "github.com/denisenkom/go-mssqldb"
"github.com/gogf/gf/frame/g"
)
func main() {
r, err := g.DB().GetAll(`SELECT TOP 10 * FROM KF_PatInfo_Emergency`)
fmt.Println(err)
g.Dump(r.ToList())
}

View File

@ -1,575 +0,0 @@
package main
import (
"fmt"
"time"
//_ "github.com/denisenkom/go-mssqldb"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
)
// 本文件用于gf框架的mssql数据库操作示例不作为单元测试使用
var db gdb.DB
// 初始化配置及创建数据库
func init() {
gdb.AddDefaultConfigNode(gdb.ConfigNode{
Host: "127.0.0.1",
Port: "1433",
User: "sa",
Pass: "123456",
Name: "test",
Type: "mssql",
Role: "master",
Charset: "utf8",
})
db, _ = gdb.New()
//gins.Config().SetPath("/home/john/Workspace/Go/GOPATH/src/github.com/gogf/gf/.example/frame")
//db = g.Database()
//gdb.SetConfig(gdb.ConfigNode {
// Host : "127.0.0.1",
// Port : 3306,
// User : "root",
// Pass : "123456",
// Name : "test",
// Type : "mysql",
//})
//db, _ = gdb.Instance()
//gdb.SetConfig(gdb.Config {
// "default" : gdb.ConfigGroup {
// gdb.ConfigNode {
// Host : "127.0.0.1",
// Port : "3306",
// User : "root",
// Pass : "123456",
// Name : "test",
// Type : "mysql",
// Role : "master",
// Weight : 100,
// },
// gdb.ConfigNode {
// Host : "127.0.0.2",
// Port : "3306",
// User : "root",
// Pass : "123456",
// Name : "test",
// Type : "mysql",
// Role : "master",
// Weight : 100,
// },
// gdb.ConfigNode {
// Host : "127.0.0.3",
// Port : "3306",
// User : "root",
// Pass : "123456",
// Name : "test",
// Type : "mysql",
// Role : "master",
// Weight : 100,
// },
// gdb.ConfigNode {
// Host : "127.0.0.4",
// Port : "3306",
// User : "root",
// Pass : "123456",
// Name : "test",
// Type : "mysql",
// Role : "master",
// Weight : 100,
// },
// },
//})
//db, _ = gdb.Instance()
}
// 创建测试数据库
func create() error {
fmt.Println("drop table aa_user:")
_, err := db.Exec("drop table aa_user")
if err != nil {
fmt.Println("drop table aa_user error.", err)
}
s := `
CREATE TABLE aa_user (
id int not null,
name VARCHAR(60),
age int,
addr varchar(60),
PRIMARY KEY (id)
)
`
fmt.Println("create table aa_user:")
_, err = db.Exec(s)
if err != nil {
fmt.Println("create table error.", err)
return err
}
/*_, err = db.Exec("drop sequence id_seq")
if err != nil {
fmt.Println("drop sequence id_seq", err)
}
fmt.Println("create sequence id_seq")
_, err = db.Exec("create sequence id_seq increment by 1 start with 1 maxvalue 9999999999 cycle cache 10")
if err != nil {
fmt.Println("create sequence id_seq error.", err)
return err
}
s = `
CREATE TRIGGER id_trigger before insert on aa_user for each row
begin
select id_seq.nextval into :new.id from dual;
end;
`
_, err = db.Exec(s)
if err != nil {
fmt.Println("create trigger error.", err)
return err
}*/
_, err = db.Exec("drop table user_detail")
if err != nil {
fmt.Println("drop table user_detail", err)
}
s = `
CREATE TABLE user_detail (
id int not null,
site VARCHAR(255),
PRIMARY KEY (id)
)
`
fmt.Println("create table user_detail:")
_, err = db.Exec(s)
if err != nil {
fmt.Println("create table user_detail error.", err)
return err
}
fmt.Println("create table success.")
return nil
}
// 数据写入
func insert(id int) {
fmt.Println("insert:")
r, err := db.Insert("aa_user", gdb.Map{
"id": id,
"name": "john",
"age": id,
})
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
if err == nil {
r, err = db.Insert("user_detail", gdb.Map{
"id": id,
"site": "http://johng.cn",
})
if err == nil {
fmt.Printf("id: %d\n", id)
} else {
fmt.Println(err)
}
} else {
fmt.Println(err)
}
fmt.Println()
}
// 基本sql查询
func query() {
fmt.Println("query:")
list, err := db.GetAll("select * from aa_user where 1=1")
if err == nil {
fmt.Println(list)
} else {
fmt.Println(err)
}
list, err = db.Table("aa_user").OrderBy("id").Limit(0, 5).Select()
if err == nil {
fmt.Println(list)
} else {
fmt.Println(err)
}
fmt.Println()
}
// replace into
func replace() {
fmt.Println("replace:")
r, err := db.Save("aa_user", gdb.Map{
"id": 1,
"name": "john",
})
if err == nil {
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 数据保存
func save() {
fmt.Println("save:")
r, err := db.Save("aa_user", gdb.Map{
"id": 1,
"name": "john",
})
if err == nil {
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 批量写入
func batchInsert() {
fmt.Println("batchInsert:")
_, err := db.BatchInsert("aa_user", gdb.List{
{"id": 11, "name": "batchInsert_john_1", "age": 11},
{"id": 12, "name": "batchInsert_john_2", "age": 12},
{"id": 13, "name": "batchInsert_john_3", "age": 13},
{"id": 14, "name": "batchInsert_john_4", "age": 14},
}, 10)
if err != nil {
fmt.Println(err)
}
fmt.Println()
}
// 数据更新
func update1() {
fmt.Println("update1:")
r, err := db.Update("aa_user", gdb.Map{"name": "john1", "age": 1}, "id=?", 1)
if err == nil {
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 数据更新
func update2() {
fmt.Println("update2:")
r, err := db.Update("aa_user", gdb.Map{"name": "john6", "age": 6}, "id=?", 2)
if err == nil {
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 数据更新
func update3() {
fmt.Println("update3:")
r, err := db.Update("aa_user", "name=?", "id=?", "john2", 3)
if err == nil {
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式查询操作1
func linkopSelect1() {
fmt.Println("linkopSelect1:")
r, err := db.Table("aa_user u").LeftJoin("user_detail ud", "u.id=ud.id").Fields("u.*, ud.site").Where("u.id > ?", 1).Limit(3, 5).Select()
if err == nil {
fmt.Println(r)
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式查询操作2
func linkopSelect2() {
fmt.Println("linkopSelect2:")
r, err := db.Table("aa_user u").LeftJoin("user_detail ud", "u.id=ud.id").Fields("u.*,ud.site").Where("u.id=?", 1).One()
if err == nil {
fmt.Println(r)
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式查询操作3
func linkopSelect3() {
fmt.Println("linkopSelect3:")
r, err := db.Table("aa_user u").LeftJoin("user_detail ud", "u.id=ud.id").Fields("ud.site").Where("u.id=?", 1).Value()
if err == nil {
fmt.Println(r.String())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式查询数量1
func linkopCount1() {
fmt.Println("linkopCount1:")
r, err := db.Table("aa_user u").LeftJoin("user_detail ud", "u.id=ud.id").Where("name like ?", "john").Count()
if err == nil {
fmt.Println(r)
} else {
fmt.Println(err)
}
fmt.Println()
}
// 错误操作
func linkopUpdate1() {
fmt.Println("linkopUpdate1:")
r, err := db.Table("henghe_setting").Update()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println("error", err)
}
fmt.Println()
}
// 通过Map指针方式传参方式
func linkopUpdate2() {
fmt.Println("linkopUpdate2:")
r, err := db.Table("aa_user").Data(gdb.Map{"name": "john2"}).Where("name=?", "john").Update()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 通过字符串方式传参
func linkopUpdate3() {
fmt.Println("linkopUpdate3:")
r, err := db.Table("aa_user").Data("name='john3'").Where("name=?", "john2").Update()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// Where条件使用Map
func linkopUpdate4() {
fmt.Println("linkopUpdate4:")
r, err := db.Table("aa_user").Data(gdb.Map{"name": "john11111"}).Where(g.Map{"id": 1}).Update()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式批量写入
func linkopBatchInsert1() {
fmt.Println("linkopBatchInsert1:")
r, err := db.Table("aa_user").Filter().Data(gdb.List{
{"id": 21, "name": "linkopBatchInsert1_john_1", "amt": 21.21, "tt": "haha"},
{"id": 22, "name": "linkopBatchInsert1_john_2", "amt": 22.22, "cc": "hahacc"},
{"id": 23, "name": "linkopBatchInsert1_john_3", "amt": 23.23, "bb": "hahabb"},
{"id": 24, "name": "linkopBatchInsert1_john_4", "amt": 24.24, "aa": "hahaaa"},
}).Insert()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式批量写入,指定每批次写入的条数
func linkopBatchInsert2() {
fmt.Println("linkopBatchInsert2:")
r, err := db.Table("aa_user").Data(gdb.List{
{"id": 25, "name": "linkopBatchInsert2john_1"},
{"id": 26, "name": "linkopBatchInsert2john_2"},
{"id": 27, "name": "linkopBatchInsert2john_3"},
{"id": 28, "name": "linkopBatchInsert2john_4"},
}).Batch(2).Insert()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式批量保存
func linkopBatchSave() {
fmt.Println("linkopBatchSave:")
r, err := db.Table("aa_user").Data(gdb.List{
{"id": 1, "name": "john_1"},
{"id": 2, "name": "john_2"},
{"id": 3, "name": "john_3"},
{"id": 4, "name": "john_4"},
}).Save()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 事务操作示例1
func transaction1() {
fmt.Println("transaction1:")
if tx, err := db.Begin(); err == nil {
r, err := tx.Insert("aa_user", gdb.Map{
"id": 30,
"name": "transaction1",
})
tx.Rollback()
fmt.Println(r, err)
}
fmt.Println()
}
// 事务操作示例2
func transaction2() {
fmt.Println("transaction2:")
if tx, err := db.Begin(); err == nil {
r, err := tx.Table("user_detail").Data(gdb.Map{"id": 6, "site": "www.baidu.com哈哈哈*?''\"~!@#$%^&*()"}).Insert()
tx.Commit()
fmt.Println(r, err)
}
fmt.Println()
}
// 主从io复用测试在mysql中使用 show full processlist 查看链接信息
func keepPing() {
fmt.Println("keepPing:")
for i := 0; i < 30; i++ {
fmt.Println("ping...", i)
err := db.PingMaster()
if err != nil {
fmt.Println(err)
return
}
err = db.PingSlave()
if err != nil {
fmt.Println(err)
return
}
time.Sleep(1 * time.Second)
}
}
// like语句查询
func likeQuery() {
fmt.Println("likeQuery:")
if r, err := db.Table("aa_user").Where("name like ?", "%john%").Select(); err == nil {
fmt.Println(r)
} else {
fmt.Println(err)
}
}
// mapToStruct
func mapToStruct() {
type User struct {
Id int
Name string
Age int
Addr string
}
fmt.Println("mapToStruct:")
if r, err := db.Table("aa_user").Where("id=?", 1).One(); err == nil {
u := User{}
if err := r.ToStruct(&u); err == nil {
fmt.Println(r)
fmt.Println(u)
} else {
fmt.Println(err)
}
} else {
fmt.Println(err)
}
}
// getQueriedSqls
func getQueriedSqls() {
for k, v := range db.GetQueriedSqls() {
fmt.Println(k, ":")
fmt.Println("Sql :", v.Sql)
fmt.Println("Args :", v.Args)
fmt.Println("Error:", v.Error)
}
}
func main() {
db.PingMaster()
db.SetDebug(true)
/*err := create()
if err != nil {
return
}*/
//test1
/*for i := 1; i < 5; i++ {
insert(i)
}*/
//insert(2)
//query()
//batchInsert()
//query()
//replace()
//save()
/*update1()
update2()
update3()
*/
/*linkopSelect1()
linkopSelect2()
linkopSelect3()
linkopCount1()
*/
/*linkopUpdate1()
linkopUpdate2()
linkopUpdate3()
linkopUpdate4()
*/
linkopBatchInsert1()
query()
//linkopBatchInsert2()
//transaction1()
//transaction2()
//
//keepPing()
//likeQuery()
//mapToStruct()
//getQueriedSqls()
}

View File

@ -1,16 +0,0 @@
# MySQL数据库配置
[database]
# debug = true
link = "mysql:root:12345678@tcp(127.0.0.1:3306)/test?parseTime=true&loc=Local"
#[database]
# [[database.default]]
# type = "mysql"
# link = "root:12345678@tcp(127.0.0.1:3306)/test?parseTime=true&loc=Local"
#

View File

@ -1,37 +0,0 @@
package main
import (
"github.com/gogf/gf/database/gdb"
"sync"
"time"
)
var db gdb.DB
func init() {
gdb.AddDefaultConfigNode(gdb.ConfigNode{
Host: "127.0.0.1",
Port: "3306",
User: "root",
Pass: "12345678",
Name: "test",
Type: "mysql",
Role: "master",
Charset: "utf8",
MaxOpenConnCount: 100,
})
db, _ = gdb.New()
}
func main() {
wg := sync.WaitGroup{}
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()
}()
}
wg.Wait()
}

View File

@ -1,4 +0,0 @@
# MySQL数据库配置
[database]
link = "mysql:root:8692651@tcp(192.168.1.11:3306)/test"

View File

@ -1,7 +0,0 @@
# MySQL数据库配置
[database]
[database.default]
link = "mysql:root:8692651@tcp(192.168.1.11:3306)/test"
[database.user]
link = "mysql:root:8692651@tcp(192.168.1.11:3306)/test"

View File

@ -1,21 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
db := g.DB()
// 开启调试模式以便于记录所有执行的SQL
db.SetDebug(true)
r, e := db.Table("test").OrderBy("id asc").All()
if e != nil {
panic(e)
}
if r != nil {
fmt.Println(r.ToList())
}
}

View File

@ -1,23 +0,0 @@
package main
import (
"github.com/gogf/gf/frame/g"
)
func main() {
db := g.DB()
db.Table("user").Where("nickname like ? and passport like ?", g.Slice{"T3", "t3"}).OrderBy("id asc").All()
conditions := g.Map{
"nickname like ?": "%T%",
"id between ? and ?": g.Slice{1, 3},
"id >= ?": 1,
"create_time > ?": 0,
"id in(?)": g.Slice{1, 2, 3},
}
db.Table("user").Where(conditions).OrderBy("id asc").All()
var params []interface{}
db.Table("user").Where("1=1", params).OrderBy("id asc").All()
}

View File

@ -1,51 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/crypto/gaes"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
)
func main() {
gdb.AddDefaultConfigNode(gdb.ConfigNode{
Host: "127.0.0.1",
Port: "3306",
User: "root",
Pass: "123456",
Name: "test",
Type: "mysql",
Role: "master",
Charset: "utf8",
})
db, err := gdb.New()
if err != nil {
panic(err)
}
key := "0123456789123456"
name := "john"
encryptedName, err := gaes.Encrypt([]byte(name), []byte(key))
if err != nil {
fmt.Println(err)
}
// 写入
r, err := db.Table("user").Data(g.Map{
"uid": 1,
"name": encryptedName,
}).Save()
if err != nil {
fmt.Println(err)
}
fmt.Println(r.RowsAffected())
// 查询
one, err := db.Table("user").Where("name=?", encryptedName).One()
if err != nil {
fmt.Println(err)
}
fmt.Println(one.ToMap())
}

View File

@ -1,20 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
db := g.DB()
db.SetDebug(true)
r, e := db.Table("test").All()
if e != nil {
panic(e)
}
if r != nil {
fmt.Println(r.ToList())
}
}

View File

@ -1,38 +0,0 @@
package main
import (
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/util/gutil"
)
func main() {
gdb.AddDefaultConfigNode(gdb.ConfigNode{
Host: "127.0.0.1",
Port: "3306",
User: "root",
Pass: "123456",
Name: "test",
Type: "mysql",
Role: "master",
Charset: "utf8",
})
db, err := gdb.New()
if err != nil {
panic(err)
}
// 开启调试模式以便于记录所有执行的SQL
db.SetDebug(true)
// 执行2次查询并将查询结果缓存3秒并可执行缓存名称(可选)
for i := 0; i < 2; i++ {
r, _ := db.Table("user").Cache(3, "vip-user").Where("uid=?", 1).One()
gutil.Dump(r.ToMap())
}
// 执行更新操作,并清理指定名称的查询缓存
db.Table("user").Cache(-1, "vip-user").Data(gdb.Map{"name": "smith"}).Where("uid=?", 1).Update()
// 再次执行查询,启用查询缓存特性
r, _ := db.Table("user").Cache(3, "vip-user").Where("uid=?", 1).One()
gutil.Dump(r.ToMap())
}

View File

@ -1,24 +0,0 @@
package main
import (
"github.com/gogf/gf/frame/g"
)
func main() {
// error!
r, err := g.DB().Table("user").Where(g.Map{
"or": g.Map{
"nickname": "jim",
"create_time > ": "2019-10-01",
},
"and": g.Map{
"nickname": "tom",
"create_time > ": "2019-10-01",
},
}).All()
if err != nil {
panic(err)
}
g.Dump(r)
}

View File

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

View File

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

View File

@ -1,24 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
g.Config().SetFileName("config3.toml")
if r, err := g.DB().Table("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 {
fmt.Println(r["uid"].Int())
fmt.Println(r["name"].String())
} else {
fmt.Println(err)
}
}

View File

@ -1,30 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/gtime"
)
func main() {
db := g.Database()
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{
"name": "john",
"create_time": gtime.Now().String(),
}).Insert()
if err == nil {
fmt.Println(r.LastInsertId())
} else {
panic(err)
}
}

View File

@ -1,37 +0,0 @@
package main
import (
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/glog"
)
func main() {
gdb.AddDefaultConfigNode(gdb.ConfigNode{
Host: "127.0.0.1",
Port: "3306",
User: "root",
Pass: "12345678",
Name: "test",
Type: "mysql",
Role: "master",
Charset: "utf8",
})
db, err := gdb.New()
if err != nil {
panic(err)
}
//db.SetDebug(false)
glog.SetPath("/tmp")
// 执行3条SQL查询
for i := 1; i <= 3; i++ {
db.Table("user").Where("uid=?", i).One()
}
// 构造一条错误查询
db.Table("user").Where("no_such_field=?", "just_test").One()
db.Table("user").Data(g.Map{"name": "smith"}).Where("uid=?", 1).Save()
}

View File

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

View File

@ -1,31 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/database/gdb"
"time"
)
func main() {
//db := g.DB()
gdb.AddDefaultConfigNode(gdb.ConfigNode{
LinkInfo: "root:12345678@tcp(127.0.0.1:3306)/test?parseTime=true&loc=Local",
Type: "mysql",
Charset: "utf8",
})
db, _ := gdb.New()
db.SetDebug(true)
type User struct {
CreateTime time.Time `orm:"create_time"`
}
r, e := db.Table("user").Data(User{CreateTime: time.Now()}).Insert()
if e != nil {
panic(e)
}
if r != nil {
fmt.Println(r.LastInsertId())
}
}

View File

@ -1,50 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
)
var (
tableName = "orders"
dao = g.DB().Table(tableName).Safe()
)
type OrderServiceEntity struct {
GoodsPrice float64 `json:"goods_price" gvalid:"required"`
PayTo int8 `json:"payTo" gvalid:"required"`
PayStatus int8 `json:"payStatus" `
CreateTime string `json:"createTime" `
AppId string `json:"appId" gvalid:"required"`
PayUser string `json:"pay_user" gvalid:"required"`
QrUrl string `json:"qr_url" `
}
type Create struct {
Id int64 `json:"id" gconv:"id"`
GoodsPrice float64 `json:"goodsPrice" gconv:"goods_price"`
PayTo int8 `json:"payTo" gconv:"pay_to"`
PayStatus int8 `json:"payStatus" gconv:"pay_status"`
CreateTime string `json:"createTime" gconv:"create_time"`
UserId int `json:"user_id" `
PayUser string `json:"pay_user" `
QrUrl string `json:"qr_url" `
}
func main() {
g.DB().SetDebug(true)
userInfo := Create{
Id: 3,
}
orderService := OrderServiceEntity{
GoodsPrice: 0.1,
PayTo: 1,
}
size, err := dao.Where("user_id", userInfo.Id).
And("goods_price", float64(100.10)).
And("pay_status", 0).
And("pay_to", orderService.PayTo).Count()
fmt.Println(err)
fmt.Println(size)
}

View File

@ -1,37 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/encoding/gparser"
"github.com/gogf/gf/frame/g"
)
func main() {
gdb.AddDefaultConfigNode(gdb.ConfigNode{
Host: "127.0.0.1",
Port: "3306",
User: "root",
Pass: "12345678",
Name: "test",
Type: "mysql",
Role: "master",
Charset: "utf8",
})
db := g.DB()
one, err := db.Table("user").Where("id=?", 1).One()
if err != nil {
panic(err)
}
// 使用内置方法转换为json/xml
fmt.Println(one.ToJson())
fmt.Println(one.ToXml())
// 自定义方法方法转换为json/xml
jsonContent, _ := gparser.VarToJson(one.ToMap())
fmt.Println(string(jsonContent))
xmlContent, _ := gparser.VarToXml(one.ToMap())
fmt.Println(string(xmlContent))
}

View File

@ -1,25 +0,0 @@
package main
import (
"time"
"github.com/gogf/gf/frame/g"
)
func main() {
db := g.DB()
db.SetMaxIdleConnCount(10)
db.SetMaxOpenConnCount(10)
db.SetMaxConnLifetime(time.Minute)
// 开启调试模式以便于记录所有执行的SQL
db.SetDebug(true)
for {
for i := 0; i < 10; i++ {
go db.Table("user").All()
}
time.Sleep(time.Second)
}
}

View File

@ -1,23 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
db := g.DB()
// 开启调试模式以便于记录所有执行的SQL
db.SetDebug(true)
type User struct {
Uid int
Name string
}
user := (*User)(nil)
fmt.Println(user)
err := db.Table("test").Where("id=1").Struct(&user)
fmt.Println(err)
fmt.Println(user)
}

View File

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

View File

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

View File

@ -1,34 +0,0 @@
package main
import (
"database/sql"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
)
func main() {
db := g.DB()
table := "medicine_clinics_upload_yinchuan"
list, err := db.Table(table).All()
if err != nil && err != sql.ErrNoRows {
panic(err)
}
content := ""
for _, item := range list {
if j, err := gjson.DecodeToJson(item["upload_data"].String()); err != nil {
panic(err)
} else {
s, _ := j.ToJsonIndentString()
content += item["id"].String() + "\t" + item["medicine_clinic_id"].String() + "\t"
content += s
content += "\n\n"
//if _, err := db.Table(table).Data("data_decode", s).Where("id", item["id"].Int()).Update(); err != nil {
// panic(err)
//}
}
}
gfile.PutContents("/Users/john/Temp/medicine_clinics_upload_yinchuan.txt", content)
}

View File

@ -1,17 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/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()
if err != nil {
panic(err)
}
fmt.Println(result.RowsAffected())
}

View File

@ -1,17 +0,0 @@
package main
import (
"github.com/gogf/gf/frame/g"
)
func main() {
db := g.DB()
db.SetDebug(true)
one, e := db.Table("order.order o").LeftJoin("user.user u", "o.uid=u.id").Where("u.id", 1).One()
if e != nil {
panic(e)
}
g.Dump(one)
}

View File

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

View File

@ -1,575 +0,0 @@
package main
import (
"fmt"
"time"
//_ "github.com/mattn/go-oci8"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
)
// 本文件用于gf框架的mysql数据库操作示例不作为单元测试使用
var db gdb.DB
// 初始化配置及创建数据库
func init() {
gdb.AddDefaultConfigNode(gdb.ConfigNode{
Host: "192.168.146.0",
Port: "1521",
User: "test",
Pass: "test",
Name: "orcl",
Type: "oracle",
Role: "master",
})
db, _ = gdb.New()
//gins.Config().SetPath("/home/john/Workspace/Go/GOPATH/src/github.com/gogf/gf/.example/frame")
//db = g.Database()
//gdb.SetConfig(gdb.ConfigNode {
// Host : "127.0.0.1",
// Port : 3306,
// User : "root",
// Pass : "123456",
// Name : "test",
// Type : "mysql",
//})
//db, _ = gdb.Instance()
//gdb.SetConfig(gdb.Config {
// "default" : gdb.ConfigGroup {
// gdb.ConfigNode {
// Host : "127.0.0.1",
// Port : "3306",
// User : "root",
// Pass : "123456",
// Name : "test",
// Type : "mysql",
// Role : "master",
// Weight : 100,
// },
// gdb.ConfigNode {
// Host : "127.0.0.2",
// Port : "3306",
// User : "root",
// Pass : "123456",
// Name : "test",
// Type : "mysql",
// Role : "master",
// Weight : 100,
// },
// gdb.ConfigNode {
// Host : "127.0.0.3",
// Port : "3306",
// User : "root",
// Pass : "123456",
// Name : "test",
// Type : "mysql",
// Role : "master",
// Weight : 100,
// },
// gdb.ConfigNode {
// Host : "127.0.0.4",
// Port : "3306",
// User : "root",
// Pass : "123456",
// Name : "test",
// Type : "mysql",
// Role : "master",
// Weight : 100,
// },
// },
//})
//db, _ = gdb.Instance()
}
// 创建测试数据库
func create() error {
fmt.Println("drop table aa_user:")
_, err := db.Exec("drop table aa_user")
if err != nil {
fmt.Println("drop table aa_user error.", err)
}
s := `
CREATE TABLE aa_user (
id number(10) not null,
name VARCHAR2(45),
age number(8),
addr varchar2(60),
amt number(12,2),
PRIMARY KEY (id)
)
`
fmt.Println("create table aa_user:")
_, err = db.Exec(s)
if err != nil {
fmt.Println("create table error.", err)
return err
}
_, err = db.Exec("drop sequence id_seq")
if err != nil {
fmt.Println("drop sequence id_seq", err)
}
/*fmt.Println("create sequence id_seq")
_, err = db.Exec("create sequence id_seq increment by 1 start with 1 maxvalue 9999999999 cycle cache 10")
if err != nil {
fmt.Println("create sequence id_seq error.", err)
return err
}
s = `
CREATE TRIGGER id_trigger before insert on aa_user for each row
begin
select id_seq.nextval into :new.id from dual;
end;
`
_, err = db.Exec(s)
if err != nil {
fmt.Println("create trigger error.", err)
return err
}*/
_, err = db.Exec("drop table user_detail")
if err != nil {
fmt.Println("drop table user_detail", err)
}
s = `
CREATE TABLE user_detail (
id number(10) not null,
site VARCHAR2(255),
PRIMARY KEY (id)
)
`
fmt.Println("create table user_detail:")
_, err = db.Exec(s)
if err != nil {
fmt.Println("create table user_detail error.", err)
return err
}
fmt.Println("create table success.")
return nil
}
// 数据写入
func insert(id int) {
fmt.Println("insert:")
r, err := db.Insert("aa_user", gdb.Map{
"id": id,
"name": "john",
"age": id,
})
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
if err == nil {
r, err = db.Insert("user_detail", gdb.Map{
"id": id,
"site": "http://johng.cn",
})
if err == nil {
fmt.Printf("id: %d\n", id)
} else {
fmt.Println(err)
}
} else {
fmt.Println(err)
}
fmt.Println()
}
// 基本sql查询
func query() {
fmt.Println("query:")
list, err := db.GetAll("select * from aa_user")
if err == nil {
fmt.Println(list)
} else {
fmt.Println(err)
}
list, err = db.Table("aa_user").OrderBy("id").Limit(0, 2).Select()
if err == nil {
fmt.Println(list)
} else {
fmt.Println(err)
}
fmt.Println()
}
// replace into
func replace() {
fmt.Println("replace:")
r, err := db.Save("aa_user", gdb.Map{
"id": 1,
"name": "john",
})
if err == nil {
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 数据保存
func save() {
fmt.Println("save:")
r, err := db.Save("aa_user", gdb.Map{
"id": 1,
"name": "john",
})
if err == nil {
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 批量写入
func batchInsert() {
fmt.Println("batchInsert:")
_, err := db.BatchInsert("aa_user", gdb.List{
{"id": 11, "name": "batchInsert_john_1", "age": 11, "amt": 11.11},
{"id": 12, "name": "batchInsert_john_2", "age": 12, "amt": 12.12},
{"id": 13, "name": "batchInsert_john_3", "age": 13, "amt": 13.13},
{"id": 14, "name": "batchInsert_john_4", "age": 14, "amt": 14.14},
}, 10)
if err != nil {
fmt.Println(err)
}
fmt.Println()
}
// 数据更新
func update1() {
fmt.Println("update1:")
r, err := db.Update("aa_user", gdb.Map{"name": "john1", "age": 1}, "id=?", 1)
if err == nil {
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 数据更新
func update2() {
fmt.Println("update2:")
r, err := db.Update("aa_user", gdb.Map{"name": "john6", "age": 6}, "id=?", 2)
if err == nil {
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 数据更新
func update3() {
fmt.Println("update3:")
r, err := db.Update("aa_user", "name=?", "id=?", "john2", 3)
if err == nil {
fmt.Println(r.LastInsertId())
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式查询操作1
func linkopSelect1() {
fmt.Println("linkopSelect1:")
r, err := db.Table("aa_user u").LeftJoin("user_detail ud", "u.id=ud.id").Fields("u.*, ud.site").Where("u.id > ?", 1).Limit(0, 2).Select()
if err == nil {
fmt.Println(r)
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式查询操作2
func linkopSelect2() {
fmt.Println("linkopSelect2:")
r, err := db.Table("aa_user u").LeftJoin("user_detail ud", "u.id=ud.id").Fields("u.*,ud.site").Where("u.id=?", 1).One()
if err == nil {
fmt.Println(r)
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式查询操作3
func linkopSelect3() {
fmt.Println("linkopSelect3:")
r, err := db.Table("aa_user u").LeftJoin("user_detail ud", "u.id=ud.id").Fields("ud.site").Where("u.id=?", 1).Value()
if err == nil {
fmt.Println(r.String())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式查询数量1
func linkopCount1() {
fmt.Println("linkopCount1:")
r, err := db.Table("aa_user u").LeftJoin("user_detail ud", "u.id=ud.id").Where("name like ?", "john").Count()
if err == nil {
fmt.Println(r)
} else {
fmt.Println(err)
}
fmt.Println()
}
// 错误操作
func linkopUpdate1() {
fmt.Println("linkopUpdate1:")
r, err := db.Table("henghe_setting").Update()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println("error", err)
}
fmt.Println()
}
// 通过Map指针方式传参方式
func linkopUpdate2() {
fmt.Println("linkopUpdate2:")
r, err := db.Table("aa_user").Data(gdb.Map{"name": "john2"}).Where("name=?", "john").Update()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 通过字符串方式传参
func linkopUpdate3() {
fmt.Println("linkopUpdate3:")
r, err := db.Table("aa_user").Data("name='john3'").Where("name=?", "john2").Update()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// Where条件使用Map
func linkopUpdate4() {
fmt.Println("linkopUpdate4:")
r, err := db.Table("aa_user").Data(gdb.Map{"name": "john11111"}).Where(g.Map{"id": 1}).Update()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式批量写入
func linkopBatchInsert1() {
fmt.Println("linkopBatchInsert1:")
r, err := db.Table("aa_user").Filter().Data(gdb.List{
{"id": 21, "name": "linkopBatchInsert1_john_1", "amt": 21.21, "tt": "haha"},
{"id": 22, "name": "linkopBatchInsert1_john_2", "amt": 22.22, "cc": "hahacc"},
{"id": 23, "name": "linkopBatchInsert1_john_3", "amt": 23.23, "bb": "hahabb"},
{"id": 24, "name": "linkopBatchInsert1_john_4", "amt": 24.24, "aa": "hahaaa"},
}).Insert()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式批量写入,指定每批次写入的条数
func linkopBatchInsert2() {
fmt.Println("linkopBatchInsert2:")
r, err := db.Table("aa_user").Data(gdb.List{
{"id": 25, "name": "linkopBatchInsert2john_1"},
{"id": 26, "name": "linkopBatchInsert2john_2"},
{"id": 27, "name": "linkopBatchInsert2john_3"},
{"id": 28, "name": "linkopBatchInsert2john_4"},
}).Batch(2).Insert()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 链式批量保存
func linkopBatchSave() {
fmt.Println("linkopBatchSave:")
r, err := db.Table("aa_user").Data(gdb.List{
{"id": 1, "name": "john_1"},
{"id": 2, "name": "john_2"},
{"id": 3, "name": "john_3"},
{"id": 4, "name": "john_4"},
}).Save()
if err == nil {
fmt.Println(r.RowsAffected())
} else {
fmt.Println(err)
}
fmt.Println()
}
// 事务操作示例1
func transaction1() {
fmt.Println("transaction1:")
if tx, err := db.Begin(); err == nil {
r, err := tx.Insert("aa_user", gdb.Map{
"id": 30,
"name": "transaction1",
})
tx.Rollback()
fmt.Println(r, err)
}
fmt.Println()
}
// 事务操作示例2
func transaction2() {
fmt.Println("transaction2:")
if tx, err := db.Begin(); err == nil {
r, err := tx.Table("user_detail").Data(gdb.Map{"id": 5, "site": "www.baidu.com哈哈哈*?~!@#$%^&*()"}).Insert()
tx.Commit()
fmt.Println(r, err)
}
fmt.Println()
}
// 主从io复用测试在mysql中使用 show full processlist 查看链接信息
func keepPing() {
fmt.Println("keepPing:")
for i := 0; i < 30; i++ {
fmt.Println("ping...", i)
err := db.PingMaster()
if err != nil {
fmt.Println(err)
return
}
err = db.PingSlave()
if err != nil {
fmt.Println(err)
return
}
time.Sleep(1 * time.Second)
}
}
// like语句查询
func likeQuery() {
fmt.Println("likeQuery:")
if r, err := db.Table("aa_user").Where("name like ?", "%john%").Select(); err == nil {
fmt.Println(r)
} else {
fmt.Println(err)
}
}
// mapToStruct
func mapToStruct() {
type User struct {
Id int
Name string
Age int
Addr string
}
fmt.Println("mapToStruct:")
if r, err := db.Table("aa_user").Where("id=?", 1).One(); err == nil {
u := User{}
if err := r.ToStruct(&u); err == nil {
fmt.Println(r)
fmt.Println(u)
} else {
fmt.Println(err)
}
} else {
fmt.Println(err)
}
}
// getQueriedSqls
func getQueriedSqls() {
for k, v := range db.GetQueriedSqls() {
fmt.Println(k, ":")
fmt.Println("Sql :", v.Sql)
fmt.Println("Args :", v.Args)
fmt.Println("Error:", v.Error)
}
}
func main() {
db.PingMaster()
db.SetDebug(true)
/*err := create()
if err != nil {
return
}*/
//test1
/*for i := 1; i < 5; i++ {
insert(i)
}
query()
*/
//batchInsert()
//query()
//replace()
//save()
//update1()
//update2()
//update3()
/*linkopSelect1()
linkopSelect2()
linkopSelect3()
linkopCount1()
*/
/*linkopUpdate1()
linkopUpdate2()
linkopUpdate3()
linkopUpdate4()
*/
linkopBatchInsert1()
query()
//linkopBatchInsert2()
//transaction1()
//transaction2()
//
//keepPing()
//likeQuery()
//mapToStruct()
//getQueriedSqls()
}

View File

@ -1,47 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/database/gdb"
"github.com/gogf/gf/frame/g"
_ "github.com/mattn/go-sqlite3"
)
func main() {
gdb.SetConfig(gdb.Config{
"default": gdb.ConfigGroup{
gdb.ConfigNode{
Name: "/tmp/my.db",
Type: "sqlite",
},
},
})
db := g.DB()
if db == nil {
panic("db create failed")
}
// 创建表
sql := `CREATE TABLE user (
uid INT PRIMARY KEY NOT NULL,
name VARCHAR(30) NOT NULL
);`
if _, err := db.Exec(sql); err != nil {
fmt.Println(err)
}
// 写入数据
result, err := db.Table("user").Data(g.Map{"uid": 1, "name": "john"}).Save()
if err == nil {
fmt.Println(result.RowsAffected())
} else {
fmt.Println(err)
}
// 删除表
sql = `DROP TABLE user;`
if _, err := db.Exec(sql); err != nil {
fmt.Println(err)
}
}

View File

@ -1,4 +0,0 @@
# Redis数据库配置
[redis]
default = "127.0.0.1:6379,0"
cache = "127.0.0.1:6379,1"

View File

@ -1,20 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/database/gredis"
"github.com/gogf/gf/util/gconv"
)
// 使用原生gredis.New操作redis但是注意需要自己调用Close方法关闭redis链接池
func main() {
redis := gredis.New(gredis.Config{
Host: "127.0.0.1",
Port: 6379,
})
defer redis.Close()
redis.Do("SET", "k", "v")
v, _ := redis.Do("GET", "k")
fmt.Println(gconv.String(v))
}

View File

@ -1,15 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
)
// 使用框架封装的g.Redis()方法获得redis操作对象单例不需要开发者显示调用Close方法
func main() {
g.Redis().Do("SET", "k", "v")
v, _ := g.Redis().Do("GET", "k")
fmt.Println(gconv.String(v))
}

View File

@ -1,16 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
)
func main() {
conn := g.Redis().Conn()
defer conn.Close()
conn.Do("SET", "k", "v")
v, _ := conn.Do("GET", "k")
fmt.Println(gconv.String(v))
}

View File

@ -1,17 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
conn := g.Redis().Conn()
defer conn.Close()
if _, err := conn.Do("SET", "k", "v"); err != nil {
panic(err)
}
v, _ := conn.DoVar("GET", "k")
fmt.Println(v.String())
}

View File

@ -1,21 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
)
func main() {
conn := g.Redis().Conn()
defer conn.Close()
conn.Send("SET", "foo", "bar")
conn.Send("GET", "foo")
conn.Flush()
// reply from SET
conn.Receive()
// reply from GET
v, _ := conn.Receive()
fmt.Println(gconv.String(v))
}

View File

@ -1,20 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
conn := g.Redis().Conn()
defer conn.Close()
conn.Send("SET", "foo", "bar")
conn.Send("GET", "foo")
conn.Flush()
// reply from SET
conn.Receive()
// reply from GET
v, _ := conn.ReceiveVar()
fmt.Println(v.String())
}

View File

@ -1,24 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
)
func main() {
conn := g.Redis().Conn()
defer conn.Close()
_, err := conn.Do("SUBSCRIBE", "channel")
if err != nil {
panic(err)
}
for {
reply, err := conn.Receive()
if err != nil {
panic(err)
}
fmt.Println(gconv.Strings(reply))
}
}

View File

@ -1,23 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
conn := g.Redis().Conn()
defer conn.Close()
_, err := conn.Do("SUBSCRIBE", "channel")
if err != nil {
panic(err)
}
for {
reply, err := conn.ReceiveVar()
if err != nil {
panic(err)
}
fmt.Println(reply.Strings())
}
}

View File

@ -1,12 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/debug/gdebug"
)
func main() {
gdebug.PrintStack()
fmt.Println(gdebug.CallerPackage())
fmt.Println(gdebug.CallerFunction())
}

View File

@ -1,10 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/debug/gdebug"
)
func main() {
fmt.Println(gdebug.BuildInfo())
}

View File

@ -1,16 +0,0 @@
package gbase64
import (
"fmt"
"github.com/gogf/gf/encoding/gbase64"
)
func main() {
s := "john"
b := gbase64.Encode(s)
c, e := gbase64.Decode(b)
fmt.Println(b)
fmt.Println(c)
fmt.Println(e)
}

View File

@ -1,55 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gbinary"
"github.com/gogf/gf/os/glog"
)
func main() {
// 使用gbinary.Encoded对基本数据类型进行二进制打包
fmt.Println(gbinary.Encode(18, 300, 1.01))
// 使用gbinary.Decode对整形二进制解包注意第二个及其后参数为字长确定的整形变量的指针地址字长确定的类型
// 例如int8/16/32/64、uint8/16/32/64、float32/64
// 这里的1.01默认为float64类型(64位系统下)
buffer := gbinary.Encode(18, 300, 1.01)
var i1 int8
var i2 int16
var f3 float64
if err := gbinary.Decode(buffer, &i1, &i2, &f3); err != nil {
glog.Error(err)
} else {
fmt.Println(i1, i2, f3)
}
// 编码/解析 int自动识别变量长度
fmt.Println(gbinary.DecodeToInt(gbinary.EncodeInt(1)))
fmt.Println(gbinary.DecodeToInt(gbinary.EncodeInt(300)))
fmt.Println(gbinary.DecodeToInt(gbinary.EncodeInt(70000)))
fmt.Println(gbinary.DecodeToInt(gbinary.EncodeInt(2000000000)))
fmt.Println(gbinary.DecodeToInt(gbinary.EncodeInt(500000000000)))
// 编码/解析 uint自动识别变量长度
fmt.Println(gbinary.DecodeToUint(gbinary.EncodeUint(1)))
fmt.Println(gbinary.DecodeToUint(gbinary.EncodeUint(300)))
fmt.Println(gbinary.DecodeToUint(gbinary.EncodeUint(70000)))
fmt.Println(gbinary.DecodeToUint(gbinary.EncodeUint(2000000000)))
fmt.Println(gbinary.DecodeToUint(gbinary.EncodeUint(500000000000)))
// 编码/解析 int8/16/32/64
fmt.Println(gbinary.DecodeToInt8(gbinary.EncodeInt8(int8(100))))
fmt.Println(gbinary.DecodeToInt16(gbinary.EncodeInt16(int16(100))))
fmt.Println(gbinary.DecodeToInt32(gbinary.EncodeInt32(int32(100))))
fmt.Println(gbinary.DecodeToInt64(gbinary.EncodeInt64(int64(100))))
// 编码/解析 uint8/16/32/64
fmt.Println(gbinary.DecodeToUint8(gbinary.EncodeUint8(uint8(100))))
fmt.Println(gbinary.DecodeToUint16(gbinary.EncodeUint16(uint16(100))))
fmt.Println(gbinary.DecodeToUint32(gbinary.EncodeUint32(uint32(100))))
fmt.Println(gbinary.DecodeToUint64(gbinary.EncodeUint64(uint64(100))))
// 编码/解析 string
fmt.Println(gbinary.DecodeToString(gbinary.EncodeString("I'm string!")))
}

View File

@ -1,33 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gbinary"
)
func main() {
// 传感器状态0:已下线, 1:开启, 2:关闭, 3:待机
count := 100
status := 1
// 网关编码
bits := make([]gbinary.Bit, 0)
for i := 0; i < count; i++ {
bits = gbinary.EncodeBits(bits, status, 2)
}
buffer := gbinary.EncodeBitsToBytes(bits)
fmt.Println("buffer length:", len(buffer))
/* 上报过程忽略,这里只展示编码/解码示例 */
// 平台解码
alivecount := 0
sensorbits := gbinary.DecodeBytesToBits(buffer)
for i := 0; i < len(sensorbits); i += 2 {
if gbinary.DecodeBits(sensorbits[i:i+2]) == 1 {
alivecount++
}
}
fmt.Println("alived sensor:", alivecount)
}

View File

@ -1,33 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gbinary"
)
func main() {
// Meta元数据文件数据结构[键名哈希64(64bit,8byte) 键名长度(8bit,1byte) 键值长度(24bit,3byte) 数据文件偏移量(40bit,5byte)](变长)
hash := 521369841259754125
klen := 12
vlen := 35535
offset := 80000000
// 编码
bits := make([]gbinary.Bit, 0)
bits = gbinary.EncodeBits(bits, hash, 64)
bits = gbinary.EncodeBits(bits, klen, 8)
bits = gbinary.EncodeBits(bits, vlen, 24)
bits = gbinary.EncodeBits(bits, offset, 40)
buffer := gbinary.EncodeBitsToBytes(bits)
fmt.Println("meta length:", len(buffer))
/* 文件存储及数据查询过程忽略,这里只展示元数据编码/解码示例 */
// 解码
metabits := gbinary.DecodeBytesToBits(buffer)
fmt.Println("hash :", gbinary.DecodeBits(metabits[0:64]))
fmt.Println("klen :", gbinary.DecodeBits(metabits[64:72]))
fmt.Println("vlen :", gbinary.DecodeBits(metabits[72:96]))
fmt.Println("offset:", gbinary.DecodeBits(metabits[96:136]))
}

View File

@ -1,20 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/frame/g"
)
func main() {
fmt.Println(g.Config().Get("redis"))
type RedisConfig struct {
Disk string
Cache string
}
redisCfg := new(RedisConfig)
fmt.Println(g.Config().GetStruct("redis", redisCfg))
fmt.Println(redisCfg)
}

View File

@ -1,20 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gcharset"
)
func main() {
src := "~{;(<dR;:x>F#,6@WCN^O`GW!#"
srcCharset := "GB2312"
dstCharset := "UTF-8"
str, err := gcharset.Convert(dstCharset, srcCharset, src)
if err != nil {
panic(err)
}
fmt.Println(str)
// output:
// 花间一壶酒,独酌无相亲。
}

View File

@ -1,15 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gcompress"
)
func main() {
err := gcompress.UnZipFile(
`D:\Workspace\Go\GOPATH\src\github.com\gogf\gf\geg\encoding\gcompress\data.zip`,
`D:\Workspace\Go\GOPATH\src\github.com\gogf\gf\geg`,
)
fmt.Println(err)
}

View File

@ -1,16 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gcompress"
"github.com/gogf/gf/os/gfile"
)
func main() {
err := gcompress.UnZipContent(
gfile.GetBytes(`D:\Workspace\Go\GOPATH\src\github.com\gogf\gf\geg\encoding\gcompress\data.zip`),
`D:\Workspace\Go\GOPATH\src\github.com\gogf\gf\geg`,
)
fmt.Println(err)
}

View File

@ -1,16 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gcompress"
)
func main() {
err := gcompress.ZipPath(
`D:\Workspace\Go\GOPATH\src\github.com\gogf\gf\geg`,
`D:\Workspace\Go\GOPATH\src\github.com\gogf\gf\geg\encoding\gcompress\data.zip`,
"my-dir",
)
fmt.Println(err)
}

View File

@ -1,20 +0,0 @@
package main
import (
"fmt"
"strconv"
"github.com/gogf/gf/encoding/ghash"
)
func main() {
m := make(map[uint64]bool)
for i := 0; i < 100000000; i++ {
hash := ghash.BKDRHash64([]byte("key_" + strconv.Itoa(i)))
if _, ok := m[hash]; ok {
fmt.Printf("duplicated hash %d\n", hash)
} else {
m[hash] = true
}
}
}

View File

@ -1,16 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gini"
)
func main() {
s := `
a = b
`
m, err := gini.Decode([]byte(s))
fmt.Println(err)
fmt.Println(m)
}

View File

@ -1,155 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/os/gtime"
)
func getByPattern() {
data :=
`{
"users" : {
"count" : 100,
"list" : [
{"name" : "小明", "score" : 60},
{"name" : "John", "score" : 99.5}
]
}
}`
j, err := gjson.DecodeToJson([]byte(data))
if err != nil {
glog.Error(err)
} else {
fmt.Println("John Score:", j.GetFloat32("users.list.1.score"))
}
}
// 当键名存在"."号时,检索优先级:键名->层级,因此不会引起歧义
func testMultiDots() {
data :=
`{
"users" : {
"count" : 100
},
"users.count" : 101
}`
j, err := gjson.DecodeToJson([]byte(data))
if err != nil {
glog.Error(err)
} else {
fmt.Println("Users Count:", j.GetInt("users.count"))
}
}
// 设置数据
func testSet() {
data :=
`{
"users" : {
"count" : 100
}
}`
j, err := gjson.DecodeToJson([]byte(data))
if err != nil {
glog.Error(err)
} else {
j.Set("users.count", 1)
j.Set("users.list", []string{"John", "小明"})
c, _ := j.ToJson()
fmt.Println(string(c))
}
}
// 将Json数据转换为其他数据格式
func testConvert() {
data :=
`{
"users" : {
"count" : 100,
"list" : ["John", "小明"]
}
}`
j, err := gjson.DecodeToJson([]byte(data))
if err != nil {
glog.Error(err)
} else {
c, _ := j.ToJson()
fmt.Println("JSON:")
fmt.Println(string(c))
fmt.Println("======================")
fmt.Println("XML:")
c, _ = j.ToXmlIndent()
fmt.Println(string(c))
fmt.Println("======================")
fmt.Println("YAML:")
c, _ = j.ToYaml()
fmt.Println(string(c))
fmt.Println("======================")
fmt.Println("TOML:")
c, _ = j.ToToml()
fmt.Println(string(c))
}
}
func testSplitChar() {
var v interface{}
j := gjson.New(nil)
t1 := gtime.Nanosecond()
j.Set("a.b.c.d.e.f.g.h.i.j.k", 1)
t2 := gtime.Nanosecond()
fmt.Println(t2 - t1)
t5 := gtime.Nanosecond()
v = j.Get("a.b.c.d.e.f.g.h.i.j.k")
t6 := gtime.Nanosecond()
fmt.Println(v)
fmt.Println(t6 - t5)
j.SetSplitChar('#')
t7 := gtime.Nanosecond()
v = j.Get("a#b#c#d#e#f#g#h#i#j#k")
t8 := gtime.Nanosecond()
fmt.Println(v)
fmt.Println(t8 - t7)
}
func testViolenceCheck() {
j := gjson.New(nil)
t1 := gtime.Nanosecond()
j.Set("a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a", 1)
t2 := gtime.Nanosecond()
fmt.Println(t2 - t1)
t3 := gtime.Nanosecond()
j.Set("a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a", 1)
t4 := gtime.Nanosecond()
fmt.Println(t4 - t3)
t5 := gtime.Nanosecond()
j.Get("a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a")
t6 := gtime.Nanosecond()
fmt.Println(t6 - t5)
j.SetViolenceCheck(false)
t7 := gtime.Nanosecond()
j.Set("a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a", 1)
t8 := gtime.Nanosecond()
fmt.Println(t8 - t7)
t9 := gtime.Nanosecond()
j.Get("a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a")
t10 := gtime.Nanosecond()
fmt.Println(t10 - t9)
}
func main() {
testViolenceCheck()
}

View File

@ -1,156 +0,0 @@
package main
import (
"encoding/json"
"fmt"
"github.com/gogf/gf/encoding/gjson"
)
type XinYanModel struct {
Success bool `json:"success"`
Data Data `json:"data"`
ErrorCode interface{} `json:"errorCode"`
ErrorMsg interface{} `json:"errorMsg"`
}
type ApplyReportDetail struct {
ApplyScore string `json:"apply_score"`
ApplyCredibility string `json:"apply_credibility"`
QueryOrgCount string `json:"apply_query_org_count"`
QueryFinanceCount string `json:"apply_query_finance_count"`
QueryCashCount string `json:"apply_query_cash_count"`
QuerySumCount string `json:"apply_query_sum_count"`
LatestQueryTime string `json:"apply_latest_query_time"`
LatestOneMonth string `json:"apply_latest_one_month"`
LatestThreeMonth string `json:"apply_latest_three_month"`
LatestSixMonth string `json:"apply_latest_six_month"`
}
type BehaviorReportDetail struct {
LoansScore string `json:"behavior_report_detailloans_score"`
LoansCredibility string `json:"behavior_report_detailloans_credibility"`
LoansCount string `json:"behavior_report_detailloans_count"`
LoansSettleCount string `json:"behavior_report_detailloans_settle_count"`
LoansOverdueCount string `json:"behavior_report_detailloans_overdue_count"`
LoansOrgCount string `json:"behavior_report_detailloans_org_count"`
ConsfinOrgCount string `json:"behavior_report_detailconsfin_org_count"`
LoansCashCount string `json:"behavior_report_detailloans_cash_count"`
LatestOneMonth string `json:"behavior_report_detaillatest_one_month"`
LatestThreeMonth string `json:"behavior_report_detaillatest_three_month"`
LatestSixMonth string `json:"behavior_report_detaillatest_six_month"`
HistorySucFee string `json:"behavior_report_detailhistory_suc_fee"`
HistoryFailFee string `json:"behavior_report_detailhistory_fail_fee"`
LatestOneMonthSuc string `json:"behavior_report_detaillatest_one_month_suc"`
LatestOneMonthFail string `json:"behavior_report_detaillatest_one_month_fail"`
LoansLongTime string `json:"behavior_report_detailloans_long_time"`
LoansLatestTime string `json:"behavior_report_detailloans_latest_time"`
}
type CurrentReportDetail struct {
LoansCreditLimit string `json:"current_report_detailloans_credit_limit"`
LoansCredibility string `json:"current_report_detailloans_credibility"`
LoansOrgCount string `json:"current_report_detailloans_org_count"`
LoansProductCount string `json:"current_report_detailloans_product_count"`
LoansMaxLimit string `json:"current_report_detailloans_max_limit"`
LoansAvgLimit string `json:"current_report_detailloans_avg_limit"`
ConsfinCreditLimit string `json:"current_report_detailconsfin_credit_limit"`
ConsfinCredibility string `json:"current_report_detailconsfin_credibility"`
ConsfinOrgCount string `json:"current_report_detailconsfin_org_count"`
ConsfinProductCount string `json:"current_report_detailconsfin_product_count"`
ConsfinMaxLimit string `json:"current_report_detailconsfin_max_limit"`
ConsfinAvgLimit string `json:"current_report_detailconsfin_avg_limit"`
}
type ResultDetail struct {
ApplyReportDetail ApplyReportDetail `json:"apply_report_detail"`
BehaviorReportDetail BehaviorReportDetail `json:"behavior_report_detail"`
CurrentReportDetail CurrentReportDetail `json:"current_report_detail"`
}
type Data struct {
Code string `json:"code"`
Desc string `json:"desc1"`
TransID string `json:"trans_id"`
TradeNo string `json:"trade_no"`
Fee string `json:"fee"`
IDNo string `json:"id_no"`
IDName string `json:"id_name"`
Versions string `json:"versions"`
ResultDetail ResultDetail `json:"result_detail"`
}
var data = `{
"success": true,
"data": {
"code": "0",
"desc": "查询成功",
"trans_id": "14910304379231213",
"trade_no": "201704011507240100057329",
"fee": "Y",
"id_no": "0783231bcc39f4957e99907e02ae401c",
"id_name": "dd67a5943781369ddd7c594e231e9e70 ",
"versions": "1.0.0",
"result_detail":{
"apply_report_detail": {
"apply_score": "189",
"apply_credibility": "84",
"query_org_count": "7",
"query_finance_count": "2",
"query_cash_count": "2",
"query_sum_count": "13",
"latest_query_time": "2017-09-03",
"latest_one_month": "1",
"latest_three_month": "5",
"latest_six_month": "12"
},
"behavior_report_detail": {
"loans_score": "199",
"loans_credibility": "90",
"loans_count": "300",
"loans_settle_count": "280",
"loans_overdue_count": "20",
"loans_org_count": "5",
"consfin_org_count": "3",
"loans_cash_count": "2",
"latest_one_month": "3",
"latest_three_month": "20",
"latest_six_month": "23",
"history_suc_fee": "30",
"history_fail_fee": "25",
"latest_one_month_suc": "5",
"latest_one_month_fail": "20",
"loans_long_time": "130",
"loans_latest_time": "2017-09-16"
},
"current_report_detail": {
"loans_credit_limit": "1400",
"loans_credibility": "80",
"loans_org_count": "7",
"loans_product_count": "8",
"loans_max_limit": "2000",
"loans_avg_limit": "1000",
"consfin_credit_limit": "1500",
"consfin_credibility": "90",
"consfin_org_count": "8",
"consfin_product_count": "5",
"consfin_max_limit": "5000",
"consfin_avg_limit": "3000"
}
}
},
"errorCode": null,
"errorMsg": null
}`
func main() {
struct1 := new(XinYanModel)
err := json.Unmarshal([]byte(data), struct1)
fmt.Println(err)
fmt.Println(struct1)
fmt.Println()
struct2 := new(XinYanModel)
j, err := gjson.DecodeToJson(data)
fmt.Println(err)
fmt.Println(j.Get("data.desc"))
err = j.ToStruct(struct2)
fmt.Println(err)
fmt.Println(struct2)
}

View File

@ -1,69 +0,0 @@
package main
import (
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/glog"
)
type GameUser struct {
Uid int `json:"uid"`
Account string `json:"account"`
Tel string `json:"tel"`
Role string `json:"role"`
Vip int `json:"vip"`
GameLevel int `json:"gamelevel"`
Diamond int `json:"diamond"`
Coin int `json:"coin"`
Value int `json:"value"`
Area string `json:"area"`
ServerName string `json:"servername"`
Time int `json:"time"`
ClientInfo *ClientInfo `json:"client_info"`
}
type ClientInfo struct {
ClientGuid string `json:"client_guid"`
ClientType int `json:"client_type"`
ClientSDKVersion string `json:"client_sdk_version"`
ClientVersion string `json:"client_version"`
PackageId string `json:"packageid"`
PhoneType string `json:"phone_type"`
DevicesId string `json:"devices_id"`
ClientMac string `json:"client_mac"`
}
func main() {
s := `{
"uid":9527,
"account":"zhangsan",
"tel":"15248787",
"role":"test",
"vip":7,
"gamelevel":59,
"diamond ":59,
"coin ":59,
"value ":99,
"area":"s",
"servername":"灵动",
"time":15454878787,
"client_info": {
"client_guid": "aaaa",
"client_type": 1,
"client_sdk_version": "1.0.1",
"client_version": "1.0.1",
"packageid":"",
"phone_type": "vivi",
"devices_id":"",
"client_mac":""
}
}`
gameUser := &GameUser{}
err := gjson.DecodeTo(s, gameUser)
if err != nil {
glog.Error(err)
}
g.Dump(gameUser)
}

View File

@ -1,19 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gjson"
)
func main() {
s := `
{"apiVersion":"v1","kind":"Service","metadata":{"labels":{"name":"http-daemon"},"name":"http-daemon","namespace":"default"},"spec":{"ports":[{"name":"http-daemon","port":8080,"protocol":"TCP","targetPort":9212}],"selector":{"app":"http-daemon","version":"v0930-082326"}}}
`
js, err := gjson.DecodeToJson(s)
if err != nil {
panic(err)
}
//g.Dump(js.ToMap())
y, _ := js.ToYamlString()
fmt.Println(y)
}

View File

@ -1,44 +0,0 @@
broker:
ip: "127.0.0.1"
tcpport: "4222"
httpport: "8222"
user: "alfxnats"
pwd: "alfxnats"
clusterid: "alfxnats"
database:
ip: "110.1.1.227"
port: "27017"
user: "alfxdev"
pwd: "alfxdev"
dbname: "alfxdev"
scheduler:
a2rparallel: 4
sleeptime: 300
worker:
name: "worker1"
domains:
officenet: 3
producnet: 3
free: 3
temppath: "/home/alfx/proc"
common:
filepath: "/home/alfx/file"
logpath: "home/alfx/log"
logdebug: true
logtrace: true
report:
localip: "127.0.0.1"
localport: ""

View File

@ -1,217 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gparser"
"github.com/gogf/gf/os/glog"
)
func getWithPattern1() {
data :=
`{
"users" : {
"count" : 100,
"list" : [
{"name" : "Ming", "score" : 60},
{"name" : "John", "score" : 99.5}
]
}
}`
if p, e := gparser.LoadContent([]byte(data)); e != nil {
glog.Error(e)
} else {
fmt.Println("John Score:", p.GetFloat32("users.list.1.score"))
}
}
func getWithPattern2() {
data :=
`<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>`
if p, e := gparser.LoadContent([]byte(data)); e != nil {
glog.Error(e)
} else {
fmt.Println("Heading:", p.GetString("note.heading"))
}
}
// 当键名存在"."号时,检索优先级:键名->层级,因此不会引起歧义
func multiDots1() {
data :=
`{
"users" : {
"count" : 100
},
"users.count" : 101
}`
if p, e := gparser.LoadContent([]byte(data)); e != nil {
glog.Error(e)
} else {
fmt.Println("Users Count:", p.Get("users.count"))
}
}
func multiDots2() {
data :=
`{
"users" : {
"count" : {
"type1" : 1,
"type2" : 2
},
"count.type1" : 100
}
}`
if p, e := gparser.LoadContent([]byte(data)); e != nil {
glog.Error(e)
} else {
fmt.Println("Users Count:", p.Get("users.count.type1"))
fmt.Println("Users Count:", p.Get("users.count.type2"))
}
}
// 设置数据
func set1() {
data :=
`<?xml version="1.0" encoding="UTF-8"?>
<article>
<count>10</count>
<list><title>gf article1</title><content>gf content1</content></list>
<list><title>gf article2</title><content>gf content2</content></list>
<list><title>gf article3</title><content>gf content3</content></list>
</article>`
if p, e := gparser.LoadContent([]byte(data)); e != nil {
glog.Error(e)
} else {
p.Set("article.list.0", nil)
c, _ := p.ToJson()
fmt.Println(string(c))
// {"article":{"count":"10","list":[{"content":"gf content2","title":"gf article2"},{"content":"gf content3","title":"gf article3"}]}}
}
}
func set2() {
data :=
`{
"users" : {
"count" : 100
}
}`
if p, e := gparser.LoadContent([]byte(data)); e != nil {
glog.Error(e)
} else {
p.Set("users.count", 1)
p.Set("users.list", []string{"John", "小明"})
c, _ := p.ToJson()
fmt.Println(string(c))
}
}
func makeXml1() {
p := gparser.New(nil)
p.Set("name", "john")
p.Set("age", 18)
p.Set("scores", map[string]int{
"语文": 100,
"数学": 100,
"英语": 100,
})
c, _ := p.ToXmlIndent("simple-xml")
fmt.Println(string(c))
}
func makeJson1() {
type Order struct {
Id int `json:"id"`
Price float32 `json:"price"`
}
p := gparser.New(nil)
p.Set("orders.list.0", Order{1, 100})
p.Set("orders.list.1", Order{2, 666})
p.Set("orders.list.2", Order{3, 999.99})
fmt.Println("Order 1 Price:", p.Get("orders.list.1.price"))
c, _ := p.ToJson()
fmt.Println(string(c))
}
func makeJson2() {
p := gparser.New(map[string]string{
"k1": "v1",
"k2": "v2",
})
p.Set("k1.1", []int{1, 2, 3})
//p.Set("0.0.1", []int{1,2,3})
c, _ := p.ToJson()
fmt.Println(string(c))
}
func makeJson3() {
p := gparser.New([]string{"a"})
p.Set("0.0.0", []int{1, 2, 3})
c, _ := p.ToJson()
fmt.Println(string(c))
}
func toStruct1() {
type Info struct {
Name string
Url string
}
o := Info{}
p := gparser.New(map[string]string{
"Name": "gf",
"Url": "https://gitee.com/johng",
})
p.ToStruct(&o)
fmt.Println("Name:", o.Name)
fmt.Println("Url :", o.Url)
}
func convert() {
p := gparser.New(map[string]string{
"name": "gf",
"site": "https://gitee.com/johng",
})
c, _ := p.ToJson()
fmt.Println("JSON:")
fmt.Println(string(c))
fmt.Println("======================")
fmt.Println("XML:")
c, _ = p.ToXmlIndent()
fmt.Println(string(c))
fmt.Println("======================")
fmt.Println("YAML:")
c, _ = p.ToYaml()
fmt.Println(string(c))
fmt.Println("======================")
fmt.Println("TOML:")
c, _ = p.ToToml()
fmt.Println(string(c))
}
func remove1() {
p := gparser.New(map[string]string{
"k1": "v1",
"k2": "v2",
})
p.Set("0.0.0.0.0.0.0.0", []int{1, 2, 3})
p.Remove("0.0")
c, _ := p.ToJson()
fmt.Println(string(c))
}
func main() {
toStruct1()
}

View File

@ -1,21 +0,0 @@
package main
import "github.com/gogf/gf/encoding/gparser"
func main() {
xml := `<?xml version="1.0" encoding="GBK"?>
<Output type="o">
<itotalSize>0</itotalSize>
<ipageSize>1</ipageSize>
<ipageIndex>2</ipageIndex>
<itotalRecords>3</itotalRecords>
<nworkOrderDtos/>
<nworkOrderFrontXML/>
</Output>`
p, err := gparser.LoadContent([]byte(xml))
if err != nil {
panic(err)
}
p.Dump()
}

View File

@ -1,77 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gparser"
)
type Conf struct {
Broker Broker
Database Database
Scheduler Scheduler
Worker Worker
Common Common
Report Report
}
type Broker struct {
Ip string
Tcport string
Httpport string
User string
Pwd string
Clusterid string
}
type Database struct {
Ip string
Port string
User string
Pwd string
Dbname string
}
type Scheduler struct {
SleepTime int
Pidfilepath string
A2rparallel int
}
type Worker struct {
Name string
Domains map[string]interface{}
Temppath string
Pidfilepath string
}
type Common struct {
Filepath string
Logpath string
Logdebug bool
Logtrace bool
}
type Report struct {
Localip string
Localport string //暂不启用
}
func main() {
_, err := gparser.Load("config.yaml")
if err != nil {
fmt.Println("oops,read config.yaml err:", err)
}
//fmt.Println("yaml.v3读取yaml文件")
//f, err := os.Open("config.yaml")
//if err != nil {
// panic(err)
//}
//var conf Conf
//err = yaml.NewDecoder(f).Decode(&conf)
//if err != nil {
// panic(err)
//}
//fmt.Println(conf)
}

View File

@ -1,30 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/encoding/gyaml"
)
func main() {
var yamlStr string = `
#即表示url属性值
url: http://www.wolfcode.cn
#即表示server.host属性的值
server:
host: http://www.wolfcode.cn
#数组即表示server为[a,b,c]
server:
- 120.168.117.21
- 120.168.117.22
- 120.168.117.23
#常量
pi: 3.14 #定义一个数值3.14
hasChild: true #定义一个boolean值
name: '你好YAML' #定义一个字符串
`
i, err := gyaml.Decode([]byte(yamlStr))
fmt.Println(err)
fmt.Println(i)
}

View File

@ -1,25 +0,0 @@
package main
import (
"errors"
"fmt"
"github.com/gogf/gf/errors/gerror"
)
func Error1() error {
return errors.New("test1")
}
func Error2() error {
return gerror.New("test2")
}
func main() {
err1 := Error1()
err2 := Error2()
fmt.Printf("%s, %-s, %+s\n", err1, err1, err1)
fmt.Printf("%v, %-v, %+v\n", err1, err1, err1)
fmt.Printf("%s, %-s, %+s\n", err2, err2, err2)
fmt.Printf("%v, %-v, %+v\n", err2, err2, err2)
}

View File

@ -1,26 +0,0 @@
package main
import (
"fmt"
"github.com/gogf/gf/errors/gerror"
)
func OpenFile() error {
return gerror.New("permission denied")
}
func OpenConfig() error {
return gerror.Wrap(OpenFile(), "configuration file opening failed")
}
func ReadConfig() error {
return gerror.Wrap(OpenConfig(), "reading configuration failed")
}
func main() {
//err := ReadConfig()
//glog.Printf("%s\n%+s", err, err)
//glog.Printf("%+v", err)
fmt.Printf("%+v", ReadConfig())
}

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