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:
Fetched directory name from the input string as the last token of the input when Split by /
Relaxed the sanitization regex to allow / and . characters in the input.
Used that the directory name to create the root directory.
Added unit tests for the newly added util functions.
Checklist
[Y] I have self-reviewed the changes being requested
[Y] I have updated the documentation (if applicable)
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