MCPcopy Index your code
hub / github.com/Melkeydev/go-blueprint / CreatePath

Method CreatePath

cmd/program/program.go:733–744  ·  view source on GitHub ↗

CreatePath creates the given directory in the projectPath

(pathToCreate string, projectPath string)

Source from the content-addressed store, hash-verified

731
732// CreatePath creates the given directory in the projectPath
733func (p *Project) CreatePath(pathToCreate string, projectPath string) error {
734 path := filepath.Join(projectPath, pathToCreate)
735 if _, err := os.Stat(path); os.IsNotExist(err) {
736 err := os.MkdirAll(path, 0o751)
737 if err != nil {
738 log.Printf("Error creating directory %v\n", err)
739 return err
740 }
741 }
742
743 return nil
744}
745
746// CreateFileWithInjection creates the given file at the
747// project path, and injects the appropriate template

Callers 1

CreateMainFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected