fix: route issues
This commit is contained in:
@@ -7,10 +7,12 @@ import (
|
||||
|
||||
"github.com/iancoleman/strcase"
|
||||
"github.com/samber/lo"
|
||||
"go.ipao.vip/atomctl/v2/pkg/utils/gomod"
|
||||
)
|
||||
|
||||
type RenderBuildOpts struct {
|
||||
PackageName string
|
||||
ModuleName string
|
||||
ProjectPackage string
|
||||
Routes []RouteDefinition
|
||||
}
|
||||
@@ -19,6 +21,7 @@ func buildRenderData(opts RenderBuildOpts) (RenderData, error) {
|
||||
rd := RenderData{
|
||||
PackageName: opts.PackageName,
|
||||
ProjectPackage: opts.ProjectPackage,
|
||||
ModuleName: gomod.GetModuleName(),
|
||||
Imports: []string{},
|
||||
Controllers: []string{},
|
||||
Routes: make(map[string][]Router),
|
||||
@@ -147,7 +150,6 @@ func buildParamToken(item ParamDefinition) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
func scalarSuffix(t string) string {
|
||||
switch t {
|
||||
case "string", "int", "int8", "int16", "int32", "int64",
|
||||
|
||||
Reference in New Issue
Block a user