forked from mirror/cobra
vgo - create directory
This commit is contained in:
parent
17dc9f8142
commit
69420a9ffa
|
@ -74,6 +74,9 @@ Init will not use an existing directory with contents.`,
|
||||||
}
|
}
|
||||||
|
|
||||||
// create cmd/root.go
|
// 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))
|
rootFile, err := os.Create(fmt.Sprintf("%s/cmd/root.go", project.AbsolutePath))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
er(err)
|
er(err)
|
||||||
|
|
Loading…
Reference in New Issue