Skip to content

Commit

Permalink
fix proto package
Browse files Browse the repository at this point in the history
  • Loading branch information
snowmerak committed Aug 20, 2023
1 parent 49ae5ed commit 652d3aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/executor/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func New(root string, moduleName string, kind int) error {
case NewKindProto:
path := filepath.Join(filepath.ToSlash(root), filepath.ToSlash(moduleName))
dir := filepath.Dir(path)
base := filepath.Base(path)
base := filepath.Base(dir)
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
return err
}
Expand All @@ -109,7 +109,7 @@ func New(root string, moduleName string, kind int) error {
return err
}

if _, err := f.WriteString(fmt.Sprintf(protoScaffold, base, moduleName)); err != nil {
if _, err := f.WriteString(fmt.Sprintf(protoScaffold, base, dir)); err != nil {
return err
}
}
Expand Down

0 comments on commit 652d3aa

Please sign in to comment.