go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

A cloud-native Go microservices framework with cli tool for productivity.

Results 430 go-zero issues
Sort by recently updated
recently updated
newest added

cmd: ``GOOS=freebsd GOARCH=amd64 go build main.go`` ---------------------------------------------------------- output: ``` # github.com/zeromicro/go-zero/core/logx ../../../.gvm/pkgsets/go1.18/global/pkg/mod/github.com/zeromicro/[email protected]/core/logx/rotatelogger.go:198:5: undefined: fs.CloseOnExec ../../../.gvm/pkgsets/go1.18/global/pkg/mod/github.com/zeromicro/[email protected]/core/logx/rotatelogger.go:261:6: undefined: fs.CloseOnExec # github.com/zeromicro/go-zero/core/metric ../../../.gvm/pkgsets/go1.18/global/pkg/mod/github.com/zeromicro/[email protected]/core/metric/counter.go:42:7: undefined: proc.AddShutdownListener ../../../.gvm/pkgsets/go1.18/global/pkg/mod/github.com/zeromicro/[email protected]/core/metric/gauge.go:45:7: undefined: proc.AddShutdownListener ../../../.gvm/pkgsets/go1.18/global/pkg/mod/github.com/zeromicro/[email protected]/core/metric/histogram.go:48:7: undefined: proc.AddShutdownListener ``` go...

![image](https://user-images.githubusercontent.com/28683154/180736384-583a35ad-6031-4117-9eca-7144a1a14bdc.png) 这段代码看意思是会执行AddShutdownListener()和AddWrapUpListener()注册的方法,但我这边测试时经常出现shutdownListeners.notifyListeners()不执行的情况, 经排查发现wrapUpListeners.notifyListeners()中执行了shutdown方法,取消了主程的阻塞,导致shutdownListeners.notifyListeners()没来得及执行 ![image](https://user-images.githubusercontent.com/28683154/180736080-11d8b7d8-e07f-48ad-be10-ae6eadf84ad5.png) 因为mian函数最后一行是server.Start(),到这里本以为问题就结束了 当我尝试注册更多的WrapUpListener时,发现无论如何主程都会等待所有的WrapUpListener执行结束再终止,而不是在执行完shutdown后立刻停止,这让我很困惑,代码如下: 按理说这个test不应该被打印 ```golang package main import ( "fmt" "github.com/zeromicro/go-zero/core/proc" "github.com/zeromicro/go-zero/rest" "syscall" "time" ) func main() { var c rest.RestConf c.Host = "0.0.0.0" c.Port = 8082...

```go type User struct { UserId int64 `db:"user_id"` Nickname string `db:"nickname"` Introduction string `db:"introduction"` } user := User{} DB.QueryRowPartial(&user, sqlGetUserNicknameByUserId, userId) DB.QueryRowPartial(&user, sqlGetUserIntroductionByUserId, userId) ``` 这样会拼装好 user 没有问题 ```go users...

**Describe the bug** The logx can be setup once (i.e. #2188). If the logx is used in some package init function or in the function svc.NewServiceContext(c), the logx mode would...

单体服务部署时需要支持热更新,一些开源方案如overseer等需要使用http Serve,gozero的internal.StartHttp是支持StartOption的,但是Server Start不支持设置,发起pr支持start时自定义StartOption

$ goctl.exe rpc new rpc Error: ERROR: 2022/07/24 00:44:30 [profiling] error parsing flags: when -address isn't specified, you must include -stream-stats-catapult-json Usage: goctl rpc new [flags] Flags: --branch string The...

stale

Does goctl tpl contain RespType? How do I find the variable contained in the *.tpl? Is this confidential? //virtual goctl code //normal var req types.{{.RequestType}} //The error occurs when I...

stale

etcd崩溃的原因有可能是因为服务压力大造成的 重启之后,发现已经启动的rpc服务无法自动在etcd注册 然后手动重新启动所有rpc服务就可以了

bug

//说明:sync.Map的原子操作,适用于读多很少,相比以前读写都使用mutex,性能会更好 //测试用例部分过不了,需要先执行fn() 函数获取val,,Kevin老师是否考虑使用sync.Map