Skip to content

Commit

Permalink
Merge pull request #40 from xiaoenai/v6
Browse files Browse the repository at this point in the history
fix main router
  • Loading branch information
swxctx authored Oct 16, 2019
2 parents f8bc27a + f8c30f3 commit 96efb4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion micro/create/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func baseTypeToJsonValue(t string) (string, bool) {
}

func (p *Project) genMainFile() {
p.replace("main.go", "${service_api_prefix}", goutil.SnakeString(p.Name))
p.replace("main.go", "${PROJ_NAME}", p.Name)
p.replace("config.go", "${service_api_prefix}", goutil.SnakeString(p.Name))
}

Expand Down
2 changes: 1 addition & 1 deletion micro/create/tpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func main() {
cfg.Srv,
discovery.ServicePlugin(cfg.Srv.InnerIpPort(), cfg.Etcd),
)
api.Route("/${service_api_prefix}", srv.Router())
api.Route("/${PROJ_NAME}", srv.Router())
srv.ListenAndServe()
}
`,
Expand Down

0 comments on commit 96efb4f

Please sign in to comment.