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 438 go-zero issues
Sort by recently updated
recently updated
newest added

> GOCTL_OS=darwin > GOCTL_ARCH=arm64 > GOCTL_HOME=/Users/xwg/.goctl > GOCTL_DEBUG=False > GOCTL_CACHE=/Users/xwg/.goctl/cache > GOCTL_VERSION=1.5.0 > PROTOC_VERSION= > PROTOC_GEN_GO_VERSION=v1.28.1 > PROTO_GEN_GO_GRPC_VERSION=1.3.0

stale

### this place https://github.com/zeromicro/go-zero/blob/b61e36445851aefecb65138fd547ec83926c7e97/tools/goctl/api/gogen/genhandlers.go#L34-L55 ### user.api ``` @server( group: user prefix: api/user ) service aif-api { @doc( summary: "Push SMS" diy1: "123" ) @handler SmsPushHandler post /sms (SmsReq) @doc( summary:...

stale

It's feature when we didn't use monorepo and we need to start lots of project based on go-zero. Therefore, we have owned a customized go-zero template. When we need to...

stale

最新的模版生成的model层代码 多了一个model.tpl,model-new.tpl和model-gen.tpl 那自定义方法其实就在xxxmodel.go里面自定义 希望这个里面导出的类型和find里面一样多 ``` Execute(map[string]any{ "withCache": withCache, "upperStartCamelObject": camel, "lowerStartCamelObject": stringx.From(camel).Untitle(), "originalPrimaryKey": wrapWithRawString(table.PrimaryKey.Name.Source(), postgreSql), "lowerStartCamelPrimaryKey": util.EscapeGolangKeyword(stringx.From(table.PrimaryKey.Name.ToCamel()).Untitle()), "dataType": table.PrimaryKey.DataType, "cacheKey": table.PrimaryCacheKey.KeyExpression, "cacheKeyVariable": table.PrimaryCacheKey.KeyLeft, "postgreSql": postgreSql, "data": table, }) 这样所有自定义的方法都在一个模版里面可以修改,不用修改其他的部分模版,比较好维护

stale

**Is your feature request related to a problem? Please describe.** .api file coupling models. I think models should independence. **Describe the solution you'd like** I hope .api file can import...

stale

我在使用 Prometheus 观察 API 指标时,发现 `metricServerReqDur` 和 `metricServerReqCodeTotal` 这两个 Metric 没有带 Http 请求方法(get/post/...)标签。 这导致 URL 相同,但是 Http 请求方法不同的 API 无法区分。请问这个怎么可以解决? 我自己模仿 PrometheusHandler 写自定义中间件,自定义的中间件无法获取 `router` 中的 `path` 参数,无法聚合 URL 中带参数的 API,所以这条路不通。

stale

I am using go-zero 1.5.0 version. When I have two sets of environment services, dev and test, there is only one redis instance. I want to set the db without...

stale

```go func (l *JustLogic) Just(req *types.JustTestRequest) (resp *types.JustTestResponsel, err error) { if req.Code != 0 { logx.Infof("Code:%d Sleep :%d", req.Code, req.Sleep) logx.Infof("Start Sleep :%d", time.Now().Unix()) time.Sleep(time.Millisecond * time.Duration(req.Sleep)) logx.Infof("End Sleep...

stale

```go sess, err := m.conn.StartSession() if err != nil { return err } defer sess.EndSession(ctx) err = sess.StartTransaction() if err != nil { return err } ctx = mongo.NewSessionContext(ctx, sess)...

This change is more flexible.We can use the sqlc.cacheConn to obtain the equal effect of sqlx.SqlConn without changing sqlc.cacheConn

do-not-merge/hold
area/orm