Give Go module initialized with dispatch init the same name as it's directory name#81
Give Go module initialized with dispatch init the same name as it's directory name#81chicoxyzzy merged 1 commit intomainfrom
dispatch init the same name as it's directory name#81Conversation
achille-roussel
left a comment
There was a problem hiding this comment.
Nice improvement 👍
| return err | ||
| } | ||
|
|
||
| // TODO: create .gitignore file? |
There was a problem hiding this comment.
Could we add a .gitignore file to the template so we don't need this to be a special case?
There was a problem hiding this comment.
I initially added it, but we never know what will be the -o flag value to ignore the binary. I made it equal to the directory name as well initially (when -o is omitted), but that's also dynamical.
What known in advance Go directories and files I should exclude?
There was a problem hiding this comment.
What do you think about these two for Go and Python?
https://github.com/github/gitignore/blob/main/Go.gitignore
https://github.com/github/gitignore/blob/main/Python.gitignore
There was a problem hiding this comment.
Let's roll with these 👍
|
Merging this. See #82 for |
This code patches the first line of the
go.modfile to set a module name to a directory name.