Skip to content

Commit

Permalink
fix: unfiy import path
Browse files Browse the repository at this point in the history
  • Loading branch information
FGYFFFF committed Jun 20, 2022
1 parent eae9578 commit ac346be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/hz/internal/generator/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"io/ioutil"
"reflect"

"github.com/cloudwego/hertz/cmd/hz/internal/util"
"gopkg.in/yaml.v2"
)

Expand Down Expand Up @@ -134,8 +135,8 @@ func serviceToLayoutData(service Layout) (map[string]interface{}, error) {
func serviceToRouterData(service Layout) (map[string]interface{}, error) {
return map[string]interface{}{
"Registers": []string{},
"RouterPkgPath": service.GoModule + "/" + defaultRouterDir,
"HandlerPkgPath": service.GoModule + "/" + defaultHandlerDir,
"RouterPkgPath": service.GoModule + util.PathToImport(sp + defaultRouterDir, ""),
"HandlerPkgPath": service.GoModule + util.PathToImport(sp + defaultHandlerDir,""),
}, nil
}

Expand Down

0 comments on commit ac346be

Please sign in to comment.