Skip to content

Conversation

@chicoxyzzy
Copy link
Contributor

@chicoxyzzy chicoxyzzy commented Jul 4, 2024

This code patches the first line of the go.mod file to set a module name to a directory name.

Copy link
Contributor

@achille-roussel achille-roussel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement 👍

return err
}

// TODO: create .gitignore file?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a .gitignore file to the template so we don't need this to be a special case?

Copy link
Contributor Author

@chicoxyzzy chicoxyzzy Jul 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's roll with these 👍

@chicoxyzzy
Copy link
Contributor Author

Merging this. See #82 for .gitignore

@chicoxyzzy chicoxyzzy merged commit e4280a0 into main Jul 4, 2024
@chicoxyzzy chicoxyzzy deleted the modify_go_template branch July 4, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants