Kevin Wan
ec1de4f48d
test: add codecov ( #1861 )
...
* test: add codecov
* test: add codecov
2022-05-03 21:22:15 +08:00
Kevin Wan
bab72b7630
chore: use time.Now() instead of timex.Time() because go optimized it ( #1860 )
2022-05-03 19:51:47 +08:00
Kevin Wan
ac321fc146
feat: add fields with logx methods, support using third party logging libs. ( #1847 )
...
* backup
* simplify
* chore: remove unused pool
* chore: fix lint errors
* chore: use strings.Builder instead of bytes.Buffer
* test: add more tests
* chore: fix reviewdog
* test: fix data race
* feat: make logger customizable
* chore: fix reviewdog
* test: fix fails
* chore: fix set writer twice
* chore: use context instead of golang.org context
* chore: specify uint32 for level types
2022-05-03 17:34:26 +08:00
全自动盒子
ae2c76765c
fix typo ( #1857 )
2022-05-03 16:25:13 +08:00
Kevin Wan
f21970c117
test: add more tests ( #1856 )
2022-05-02 21:24:20 +08:00
Kevin Wan
d0a58d1f2d
docs: update readme ( #1849 )
2022-05-01 12:48:47 +08:00
Kevin Wan
3bbc90ec24
refactor: move json related header vars to internal ( #1840 )
...
* refactor: move json related header vars to internal
* refactor: use header.ContentType
2022-04-28 15:12:04 +08:00
Kevin Wan
cef83efd4e
fix #1838 ( #1839 )
2022-04-28 11:25:26 +08:00
anqiansong
cc09ab2aba
feat: Support model code generation for multi tables ( #1836 )
...
* Support model code generation for multi tables
* Format code
* Format code
Co-authored-by: anqiansong <anqiansong@bytedance.com>
2022-04-28 10:01:04 +08:00
Kevin Wan
f7a60cdc24
fix: remove deprecated dependencies ( #1837 )
...
* fix: remove deprecated dependencies
* backup
* fix test error
2022-04-27 21:34:54 +08:00
Kevin Wan
c3a49ece8d
Update readme-cn.md
...
add go-zero users.
2022-04-27 13:50:54 +08:00
Kevin Wan
1a38eddffe
refactor: simplify the code ( #1835 )
2022-04-27 10:44:24 +08:00
Kevin Wan
5bcee4cf7c
fix #1806 ( #1833 )
...
* fix #1806
* chore: refine error text
2022-04-27 00:01:31 +08:00
Kevin Wan
5c9fae7e62
feat: support sub domain for cors ( #1827 )
2022-04-25 21:56:59 +08:00
Kevin Wan
ec3e02624c
feat: upgrade grpc to 1.46, and remove the deprecated grpc.WithBalancerName ( #1820 )
2022-04-24 22:42:40 +08:00
chen quan
22b157bb6c
chore: optimize code ( #1818 )
...
Signed-off-by: chenquan <chenquan.dev@gmail.com>
2022-04-23 22:02:04 +08:00
Kevin Wan
095b603788
chore: remove gofumpt -s flag, default to be enabled ( #1816 )
2022-04-22 14:37:17 +08:00
Kevin Wan
bc3c9484d1
chore: refactor ( #1814 )
2022-04-22 09:37:09 +08:00
chen quan
162e9cef86
feat: add trace in redis & mon & sql ( #1799 )
...
* feat: add sub spanId with redis
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* add tests
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* fix a bug
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* feat: add sub spanId in sql
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* feat: add sub spanId in mon
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* chore: optimize code
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* feat: add breaker in warpSession
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* chore: optimize code
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* test: add tests
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* chore: reformat code
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* fix: fix typo
Signed-off-by: chenquan <chenquan.dev@gmail.com>
* fix a bug
Signed-off-by: chenquan <chenquan.dev@gmail.com>
2022-04-22 09:04:44 +08:00
Vee Zhang
94ddb3380e
fix: rest: WriteJson get 200 when Marshal failed. ( #1803 )
...
Only the first WriteHeader call takes effect.
2022-04-21 21:55:01 +08:00
anqiansong
16c61c6657
chore: Embed unit test data ( #1812 )
...
* Embed unit test data
* Add testdata
Co-authored-by: anqiansong <anqiansong@bytedance.com>
2022-04-21 21:49:09 +08:00
chowyu12
14bf2f33f7
add go-grpc_opt and go_opt for grpc new command ( #1769 )
...
Co-authored-by: zhouyy <zhouyy@ickey.cn>
2022-04-21 16:45:56 +08:00
anqiansong
305587aa81
fix: Fix issue #1810 ( #1811 )
...
* Fix #1810
* Remove go embed
* Format code
* Remove useless code
Co-authored-by: anqiansong <anqiansong@bytedance.com>
2022-04-21 15:22:43 +08:00
Kevin Wan
2cdff97934
feat: use mongodb official driver instead of mgo ( #1782 )
...
* wip: backup
* wip: backup
* wip: backup
* backup
* backup
* backup
* add more tests
* fix wrong dependency
* fix lint errors
* remove test due to data race
* add tests
* fix test error
* add mon.Model
* add mon.Model unmarshal
* add monc
* add more tests for monc
* add more tests for monc
* add docs for mon and monc packages
* fix doc errors
* chhore: add comment
* chore: fix test bug
* chore: refine tests
* chore: remove primitive.NewObjectID in test code
* chore: rename test files for typo
2022-04-19 14:03:04 +08:00
fang duan
bbe1249ecb
update rpc generate sample proto file ( #1709 )
...
* update rpc generate sample proto file
* update
2022-04-19 10:59:16 +08:00
Fyn
e62870e268
feat(goctl): go work multi-module support ( #1800 )
...
* feat(goctl): go work multi-module support
Resolve : #1793
* chore: print log when getting project ctx fails
2022-04-18 20:36:41 +08:00
Kevin Wan
92b450eb11
fix: ignore timeout on websocket ( #1802 )
2022-04-18 20:14:46 +08:00
杨圆建
d58cf7a12a
fix: Hdel check result & Pfadd check result ( #1801 )
2022-04-18 17:38:36 +08:00
Fyn
036d803fbb
docs(goctl): goctl 1.3.4 migration note ( #1780 )
...
* docs(goctl): goctl 1.3.4 migration note
* adds a simple lang check
* adds migration notes
* chore: remove i18n
* chore: remove todo
2022-04-18 14:42:13 +08:00
chen quan
c6ab11b14f
chore: use grpc.WithTransportCredentials and insecure.NewCredentials() instead of grpc.WithInsecure ( #1798 )
...
Signed-off-by: chenquan <chenquan.dev@gmail.com>
2022-04-18 14:15:09 +08:00
Kevin Wan
9e20b1bbfe
chhore: fix usage typo ( #1797 )
2022-04-17 21:17:31 +08:00
fang duan
fadef0ccd9
goctl api new should given a service_name explictly ( #1688 )
2022-04-17 20:59:18 +08:00
fang duan
4382ec0e0d
show help when running goctl api without any flags ( #1678 )
...
close #1676
2022-04-17 20:58:12 +08:00
fang duan
db99addc64
show help when running goctl docker without any flags ( #1679 )
...
close #1677
2022-04-17 20:57:46 +08:00
fang duan
97bf3856c1
show help when running goctl rpc protoc without any flags ( #1683 )
2022-04-17 20:57:26 +08:00
fang duan
ff6c6558dd
improve goctl rpc new ( #1687 )
2022-04-17 20:56:56 +08:00
Kevin Wan
5d4e7c84ee
revert postgres package refactor ( #1796 )
...
* Revert "refactor: move postgres to pg package (#1781 )"
This reverts commit ba8ac974aa
.
* remove pg, use postgres
2022-04-17 12:07: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
Fyn
ee88abce14
fix(goctl): api/new/api.tpl ( #1788 )
2022-04-14 23:43:48 +08:00
Kevin Wan
ecc3653d44
fix #1729 ( #1783 )
2022-04-13 19:06:00 +08:00
Kevin Wan
ba8ac974aa
refactor: move postgres to pg package ( #1781 )
2022-04-13 12:46:09 +08:00
Kevin Wan
50de01fb49
feat: add httpc.Do & httpc.Service.Do ( #1775 )
...
* backup
* backup
* backup
* feat: add httpc.Do & httpc.Service.Do
* fix: not using strings.Cut, it's from Go 1.18
* chore: remove redudant code
* feat: httpc.Do finished
* chore: fix reviewdog
* chore: break loop if found
* add more tests
2022-04-11 11:00:28 +08:00
方航
fabea4c448
fix bug: crash when generate model with goctl. ( #1777 )
...
* fix bug: crash when generate model with goctl.
situation: column name with line.
CREATE TABLE test (
id int NOT NULL AUTO_INCREMENT,
zh-cn text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '中文简体',
PRIMARY KEY (id) USING BTREE,
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
* group imports
group imports
* Use
go-zero/tools/goctl/util/string.go
func SafeString(in string) string {
instead of ReplaceAll
Co-authored-by: 方航 <fanghang@tange.ai>
2022-04-11 10:11:40 +08:00
Fyn
6d9dfc08f9
feat(goctl): supports api multi-level importing ( #1747 )
...
* feat(goctl): supports api multi-level importing
Resolves : #1744
* fix(goctl): import-cycle, etc.
import-cycle will not be allowed
e.g., a.api -> b.api -> a.api
regular multiple-import will be allowed
e.g., a.api -> b.api -> c.api
-> c.api
* refactor(goctl): adds comments to exported var
* fix(goctl): typo in a comment
2022-04-09 23:26:57 +08:00
anqiansong
252fabcc4b
fix nil pointer if group not exists ( #1773 )
...
Co-authored-by: anqiansong <anqiansong@bytedance.com>
2022-04-09 11:54:30 +08:00
Kevin Wan
415c4c91fc
fix: model unique keys generated differently in each re-generation ( #1771 )
2022-04-09 00:25:23 +08:00
fang duan
0cc9d4ff8d
show help when running goctl rpc template without any flags ( #1685 )
...
close #1684
2022-04-08 22:28:45 +08:00
Kevin Wan
8bc34defc4
chore: avoid deadlock after stopping TimingWheel ( #1768 )
2022-04-07 11:50:18 +08:00
anqiansong
8dd764679c
Fix #1765 ( #1767 )
...
Co-authored-by: anqiansong <anqiansong@bytedance.com>
2022-04-07 10:40:21 +08:00
Kevin Wan
9fe868ade9
chore: remove legacy code ( #1766 )
2022-04-06 23:24:20 +08:00