We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q: How do I submit a new .gitignore template? A: Please submit all new templates to @toptal/gitignore.
.gitignore
Q: How do I suggest modifications to existing .gitignore templates? A: Modifications should come in the form of pull requests at @toptal/gitignore.
The .gitignore template for Go projects should exclude common files and directories like:
.env
./main
build/
tmp/
The default Go .gitignore template does not exclude the following:
Create a new Go project and initialize a Git repository:
go mod init example.com/myapp git init
Go to https://www.toptal.com/developers/gitignore/ and request for a new .gitignore file for Go/Goland: https://www.toptal.com/developers/gitignore/api/go,goland
Install air and initialize .air.toml file
.air.toml
Add a .env file, test your app and build it for production.
Expected behaviour:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue Template
Frequently Asked Questions
Q: How do I submit a new
.gitignore
template?A: Please submit all new templates to @toptal/gitignore.
Q: How do I suggest modifications to existing
.gitignore
templates?A: Modifications should come in the form of pull requests at @toptal/gitignore.
Issue
Development Environment:
Expected Behavior:
The
.gitignore
template for Go projects should exclude common files and directories like:.env
files (which often contain sensitive environment variables)./main
(commonly used binary output)build/
(directory for compiled binaries)tmp/
(temporary files)Actual Behavior:
The default Go
.gitignore
template does not exclude the following:.env
./main
build/
tmp/
Reproduction Steps:
Create a new Go project and initialize a Git repository:
Go to https://www.toptal.com/developers/gitignore/ and request for a new .gitignore file for Go/Goland: https://www.toptal.com/developers/gitignore/api/go,goland
Install air and initialize
.air.toml
fileAdd a
.env
file, test your app and build it for production.Expected behaviour:
The text was updated successfully, but these errors were encountered: