go-zero
go-zero copied to clipboard
monolithic-service uses generics to simplify registering Handler routing
Is your feature request related to a problem? Please describe. The go language monolithic-service generated by goctl is simplified with generics
Describe the solution you'd like Since go v1.18, generics have been introduced, which can be used to defer Handler handlers in order to defer Handlers added by routes to the actual Logic structure.
Describe alternatives you've considered
Refer to BaseHandlerFunc and baselogic.go, then add Handler method to each logic.go structure, change HandlerFunc in routes.go to BaseHandlerFunc
Additional context go-zero单体服务使用泛型简化注册Handler路由
Thanks, but we need to support go 1.16 at the moment.
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.