Skip to content

Commit

Permalink
vgo - create directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jharshman authored and spf13 committed Jun 7, 2019
1 parent 17dc9f8 commit 69420a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cobra/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ Init will not use an existing directory with contents.`,
}

// create cmd/root.go
if _, err = os.Stat(fmt.Sprintf("%s/cmd", project.AbsolutePath)); os.IsNotExist(err) {
os.Mkdir("cmd", 0751)
}
rootFile, err := os.Create(fmt.Sprintf("%s/cmd/root.go", project.AbsolutePath))
if err != nil {
er(err)
Expand Down

0 comments on commit 69420a9

Please sign in to comment.