Commit Graph

2159 Commits (814852f0b83f8d281c71b12e29eb6bacd9267ad0)
 

Author SHA1 Message Date
Kevin Wan 5451d96a81
chore: update some logs (#1875) 3 years ago
Kevin Wan 69c2bad410
feat: logx with color (#1872)
* feat: logx with color

* chore: update logs

* fix test error

* chore: change colors of http codes

* chore: add comments

* chore: use faith/color instead of ascii code color

* chore: update colors

* chore: update colors

* chore: fix duplicated slowcall text

* chore: remove slowcall colors
3 years ago
anqiansong 5383e29ce6
feat: Replace cli to cobra (#1855)
* Replace cli

* Replace cli

* Replace cli

* Format code

* Add compare case

* Add compare case

* Add compare case

* Support go style flag

* Support go style flag

* Add test case
3 years ago
Kevin Wan 51472004a3
Update readme.md 3 years ago
Kevin Wan caf5b7b1f1
Update readme-cn.md 3 years ago
Kevin Wan bef9aa55e6
Update readme.md 3 years ago
Kevin Wan d0a59b13a6
chore: fix deprecated usages (#1871)
* add conf documents

* chore: use {} instead of () for environment variables

* chore: fix deprecated usages

* chore: fix unstable tests

* chore: show stack on github actions
3 years ago
Kevin Wan 469e62067c
add conf documents (#1869)
* add conf documents

* chore: use {} instead of () for environment variables
3 years ago
Kevin Wan a36d58aac9
fix time, duration, slice types on logx.Field (#1868)
* chore: refine tests

* fix #1866
3 years ago
Kevin Wan aa5118c2aa
chore: refine tests (#1864) 3 years ago
Kevin Wan 974ba5c9aa
test: add codecov (#1863) 3 years ago
Kevin Wan ec1de4f48d
test: add codecov (#1861)
* test: add codecov

* test: add codecov
3 years ago
Kevin Wan bab72b7630
chore: use time.Now() instead of timex.Time() because go optimized it (#1860) 3 years ago
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
3 years ago
全自动盒子 ae2c76765c
fix typo (#1857) 3 years ago
Kevin Wan f21970c117
test: add more tests (#1856) 3 years ago
Kevin Wan d0a58d1f2d
docs: update readme (#1849) 3 years ago
Kevin Wan 3bbc90ec24
refactor: move json related header vars to internal (#1840)
* refactor: move json related header vars to internal

* refactor: use header.ContentType
3 years ago
Kevin Wan cef83efd4e
fix #1838 (#1839) 3 years ago
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>
3 years ago
Kevin Wan f7a60cdc24
fix: remove deprecated dependencies (#1837)
* fix: remove deprecated dependencies

* backup

* fix test error
3 years ago
Kevin Wan c3a49ece8d
Update readme-cn.md
add go-zero users.
3 years ago
Kevin Wan 1a38eddffe
refactor: simplify the code (#1835) 3 years ago
Kevin Wan 5bcee4cf7c
fix #1806 (#1833)
* fix #1806

* chore: refine error text
3 years ago
Kevin Wan 5c9fae7e62
feat: support sub domain for cors (#1827) 3 years ago
Kevin Wan ec3e02624c
feat: upgrade grpc to 1.46, and remove the deprecated grpc.WithBalancerName (#1820) 3 years ago
chen quan 22b157bb6c
chore: optimize code (#1818)
Signed-off-by: chenquan <chenquan.dev@gmail.com>
3 years ago
Kevin Wan 095b603788
chore: remove gofumpt -s flag, default to be enabled (#1816) 3 years ago
Kevin Wan bc3c9484d1
chore: refactor (#1814) 3 years ago
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>
3 years ago
Vee Zhang 94ddb3380e
fix: rest: WriteJson get 200 when Marshal failed. (#1803)
Only the first WriteHeader call takes effect.
3 years ago
anqiansong 16c61c6657
chore: Embed unit test data (#1812)
* Embed unit test data

* Add testdata

Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
chowyu12 14bf2f33f7
add go-grpc_opt and go_opt for grpc new command (#1769)
Co-authored-by: zhouyy <zhouyy@ickey.cn>
3 years ago
anqiansong 305587aa81
fix: Fix issue #1810 (#1811)
* Fix #1810

* Remove go embed

* Format code

* Remove useless code

Co-authored-by: anqiansong <anqiansong@bytedance.com>
3 years ago
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
3 years ago
fang duan bbe1249ecb
update rpc generate sample proto file (#1709)
* update rpc generate sample proto file

* update
3 years ago
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
3 years ago
Kevin Wan 92b450eb11
fix: ignore timeout on websocket (#1802) 3 years ago
杨圆建 d58cf7a12a
fix: Hdel check result & Pfadd check result (#1801) 3 years ago
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
3 years ago
chen quan c6ab11b14f
chore: use grpc.WithTransportCredentials and insecure.NewCredentials() instead of grpc.WithInsecure (#1798)
Signed-off-by: chenquan <chenquan.dev@gmail.com>
3 years ago
Kevin Wan 9e20b1bbfe
chhore: fix usage typo (#1797) 3 years ago
fang duan fadef0ccd9
goctl api new should given a service_name explictly (#1688) 3 years ago
fang duan 4382ec0e0d
show help when running goctl api without any flags (#1678)
close #1676
3 years ago
fang duan db99addc64
show help when running goctl docker without any flags (#1679)
close #1677
3 years ago
fang duan 97bf3856c1
show help when running goctl rpc protoc without any flags (#1683) 3 years ago
fang duan ff6c6558dd
improve goctl rpc new (#1687) 3 years ago
Kevin Wan 5d4e7c84ee
revert postgres package refactor (#1796)
* Revert "refactor: move postgres to pg package (#1781)"

This reverts commit ba8ac974aa.

* remove pg, use postgres
3 years ago
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
3 years ago
Fyn ee88abce14
fix(goctl): api/new/api.tpl (#1788) 3 years ago