Skip to content

Commit

Permalink
stop generating gitignore on new
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Vlasic committed Jan 11, 2022
1 parent 7d9bf4c commit 9066e94
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions cli/controller/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,6 @@ func findPackageImportPath(projectPath string) (string, error) {
return modfile.ModulePath(buf), nil
}

func generateGitignore(path, content string) error {
gitignoreFile := filepath.Join(path, ".gitignore")
f, err := os.OpenFile(gitignoreFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
return log.Wrap(err)
}
defer f.Close()
_, err = f.WriteString(fmt.Sprintf("%s\n", content))
return log.Wrap(err)
}

func generateApi(projectPath, functionName string, methods []string) error {
if err := generateApiDefault(projectPath, functionName); err != nil {
return log.Wrap(err)
Expand Down
2 changes: 0 additions & 2 deletions cli/controller/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ func createProject(name, from, moduleName string) error {
os.Remove(filepath.Join(projectPath, "excuses.png"))
}
}
// create .gitignore with BuildDir
generateGitignore(projectPath, BuildDir)

fs, err := newStore()
if err != nil {
Expand Down

0 comments on commit 9066e94

Please sign in to comment.