Melkeydev / go-blueprint

Go-blueprint allows users to spin up a quick Go project using a popular framework
https://docs.go-blueprint.dev/
MIT License
5.2k stars 302 forks source link

Accept module name as input to create command #298

Closed Patel-Raj closed 2 months ago

Patel-Raj commented 2 months ago

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Problem/Feature

go-blueprint create command was not working as expected if the user enters module name as an input rather than directory name.

Eg: go-blueprint create --name github.com/Patel-Raj/project1

This would create sub-directories github.com, Patel-Raj and project1 and then create the projects source code in project1 directory.

After this change, the Go project will be created at project1 as the root directory and the go.mod would have github.com/Patel-Raj/project1 as its module name.

Fixes: #285

Description of Changes:

Checklist