go-zero
go-zero copied to clipboard
[Feature request] generate api
About the goctl api to generate [2]float64
some code snippets as below:
my.api
type (
MyPointResp {
Coords [2]float64 `json:"coords"`
}
)
Current Behavior
types/types.go:
type MyPointResp struct {
Coords []float64 `json:"coords"`
}
Expected Behavior
types/types.go:
type MyPointResp struct {
Coords [2]float64 `json:"coords"`
}
Got it, I'll fix it!
@wonderfate zero-api only supported slice, so you will never get
type MyPointResp struct {
Coords []float64 `json:"coords"`
}
from
type (
MyPointResp {
Coords [2]float64 `json:"coords"`
}
)
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.