Commit Graph

46 Commits

Author SHA1 Message Date
Kevin Wan
e13fd62d38
chore: coding style (#3106)
Co-authored-by: cong <zhangcong1992@gmail.com>
2023-04-08 21:37:53 +08:00
MarkJoyMa
2e6402f4b5
fix: fillDefault, handling of nested structs (#3072) 2023-04-08 11:43:13 +00:00
Kevin Wan
9c6b516bb8
fix: #3058 (#3059) 2023-03-23 23:45:57 +08:00
Kevin Wan
4cef2b412c
fix: avoid unmarshal panic with incorrect map keys #3002 (#3013) 2023-03-11 07:53:57 +08:00
MarkJoyMa
7086fb6dda x 2023-03-04 11:44:47 +00:00
MarkJoyMa
142c46228b x 2023-03-04 11:44:47 +00:00
MarkJoyMa
ba771f8ff1 add ut 2023-03-04 11:44:47 +00:00
Kevin Wan
434973c206
fix: test failure (#2874) 2023-02-12 20:08:02 +08:00
Mikael
84f9863b63
only unmashal public variables (#2872)
* only unmashal public variables

* only unmashal public variables

* only unmashal public variables

* only unmashal public variables
2023-02-12 19:53:20 +08:00
Kevin Wan
ae87114282
chore: change interface{} to any (#2818)
* chore: change interface{} to any

* chore: update goctl version to 1.5.0

* chore: update goctl deps
2023-01-24 16:32:02 +08:00
Kevin Wan
c9b05ae07e
fix: mapping optional dep not canonicaled (#2807) 2023-01-20 23:57:49 +08:00
Kevin Wan
4d7fa08b0b
feat: support **struct in mapping (#2784)
* feat: support **struct in mapping

* chore: fix test failure
2023-01-12 20:45:32 +08:00
Kevin Wan
367afb544c
feat: support ptr of ptr of ... in mapping (#2779)
* feat: support ptr of ptr of ... in mapping

* feat: support ptr of ptr of time.Duration in mapping

* feat: support ptr of ptr of json.Number in mapping

* chore: improve setting in mapping

* feat: support ptr of ptr encoding.TextUnmarshaler in mapping

* chore: add more tests

* fix: string ptr

* chore: update tests
2023-01-12 15:56:51 +08:00
Kevin Wan
bae061a67e
chore: add tests (#2778) 2023-01-11 15:21:39 +08:00
Kevin Wan
0b176e17ac
fix: #2576 (#2776) 2023-01-11 00:45:11 +08:00
Kevin Wan
cf6c349118
fix: #2735 (#2736)
* fix: #2735

* chore: make error consistent
2023-01-01 12:21:53 +08:00
Kevin Wan
affbcb5698
fix: camel cased key of map item in config (#2715)
* fix: camel cased key of map item in config

* fix: mapping anonymous problem

* fix: mapping anonymous problem

* chore: refactor

* chore: add more tests

* chore: refactor
2022-12-24 21:26:33 +08:00
Kevin Wan
f76b976262
fix: #2684 (#2693) 2022-12-13 00:16:31 +08:00
Kevin Wan
fdc57d07d7
fix: #2672 (#2681)
* fix: #2672

* chore: fix more cases

* chore: update deps

* chore: update deps

* chore: refactor

* chore: refactor

* chore: refactor
2022-12-11 00:41:50 +08:00
Kevin Wan
06fafd2153
feat: validate value in options for mapping (#2616) 2022-11-18 19:46:23 +08:00
Kevin Wan
b562e940e7
feat: support bool for env tag (#2593) 2022-11-12 13:58:35 +08:00
Kevin Wan
69068cdaf0
feat: support env tag in config (#2577)
* feat: support env tag in config

* chore: add more tests

* chore: add more tests, add stringx.Join

* fix: test fail

* chore: remove print code

* chore: rename variable
2022-11-11 23:17:09 +08:00
Kevin Wan
e3e08a7396
fix: inherit issue when parent after inherits (#2586)
* fix: inherit issue when parent after inherits

* chore: add more tests
2022-11-10 22:13:05 +08:00
Kevin Wan
1677a4dceb
feat: conf inherit (#2568)
* feat: add ValuerWithParent

* feat: make etcd config inherit from parents

* chore: add more tests

* chore: add more tests

* chore: add more comments

* chore: refactor

* chore: add more comments

* fix: fix duplicated code and refactor

* fix: remove unnecessary code

* fix: fix test case for removing print

* feat: support partial inherit
2022-11-08 15:27:48 +08:00
re-dylan
4d2a146733
typo(mapping): fix typo for key (#2548) 2022-10-24 21:43:53 +08:00
Kevin Wan
f9beab1095
feat: support uuid.UUID in mapping (#2537) 2022-10-20 20:11:19 +08:00
Halo
aa2be0163a
fix: add more tests (#2473)
* chore: add string to map in httpx parse method

* feat: add httpx parse stringToMap method test

* fix: add more test
2022-09-30 22:01:39 +08:00
Halo
05737f6519
feat: add string to map in httpx parse method (#2459)
* chore: add string to map in httpx parse method

* feat: add httpx parse stringToMap method test
2022-09-29 22:34:58 +08:00
家福
f3b8fef34f
fix: type matching supports string to int (#2038)
* fix: type matching supports string to int

* feat: type matching supports string to int

Co-authored-by: 程家福 <chengjiafu@uniontech.com>
2022-07-01 23:21:31 +08:00
Kevin Wan
1d95e95cf8
chore: make methods consistent in signatures (#1971)
* chore: make methods consistent in signatures

* test: fix fails
2022-06-05 12:56:13 +08:00
taobig
3fa8c5940d
fix: The validation of tag "options" is not working with int/uint type (#1969) 2022-06-05 11:51:43 +08:00
Kevin Wan
b94b68a427
chore: refactoring mapping string to slice (#1959) 2022-06-03 10:49:22 +08:00
家福
07145b210e
fix: panic on convert to string on fillSliceFromString() (#1951)
* Update unmarshaler.go

 fix: 修复fillSliceFromString()方法中mapValue 强转string后的panic 错误

* test: 增加单元测试

增加单元测试

* Update unmarshaler_test.go
2022-06-03 00:27:48 +08:00
Kevin Wan
cb4fcf2c6c
fix marshal ptr in httpc (#1789)
* fix marshal ptr in httpc

* add more tests

* add more tests

* add more tests

* fix issue on options and optional both provided
2022-04-15 19:07:34 +08:00
Kevin Wan
ecc3653d44
fix #1729 (#1783) 2022-04-13 19:06:00 +08:00
Kevin Wan
e9620c8c05
chore: refactor code (#1708) 2022-03-24 22:10:15 +08:00
aimuz
70e51bb352
fix: empty slice are set to nil (#1702)
support for empty slce, Same behavior as json.Unmarshal
2022-03-24 21:41:38 +08:00
Kevin Wan
a91c3907a8
feat: rename module from tal-tech to zeromicro (#1413) 2022-01-04 15:51:32 +08:00
Kevin Wan
23deaf50e6
feat: support array in default and options tags (#1386)
* feat: support array in default and options tags

* feat: ignore spaces in tags

* test: add more tests
2021-12-29 17:37:36 +08:00
skykiss
01c92a6bc5
fix: Fix problems with non support for multidimensional arrays and basic type pointer arrays (#778)
Co-authored-by: shaoqian <shaoqian.zhang@appshahe.com>
2021-06-23 10:58:01 +08:00
Bo-Yi Wu
afd9ff889e
chore: update code format. (#628) 2021-04-15 19:49:17 +08:00
Kevin Wan
334ee4213f
fix golint issues in core/mapping (#497) 2021-02-20 23:18:22 +08:00
kevin
33a9db85c8 add unit test, fix interceptor bug 2020-09-29 14:30:22 +08:00
kevin
e5d7c3ab04 unmarshal should be struct 2020-09-28 15:19:30 +08:00
kevin
0a7e0cce77 update package reference 2020-08-08 16:40:10 +08:00
kevin
7e3a369a8f initial import 2020-07-26 17:09:05 +08:00