Myapp is an myapp app.
A basic tree would look like:
.
├── commands
│ ├── myapp.go
│ └── myapp_test.go
├── script
│ └── setup
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── Gopkg.lock
├── Gopkg.toml
├── LICENSE
├── README.md
├── goreleaser.yml
├── magefile.go
└── main.go
- commands/myapp.go and myapp_test.go: is the “library” of the application and its respective files. Could be more than one file, of course;
- script: script help me start new projects faster;
- .gitignore: some standard gitignore, vendor, binary, etc;
- .travis.yml: tell Travis CI what to do;
- CONTRIBUTING.md: newcommer guide;
- Gopkg.lock and Gopkg.toml: dependencies locks and manifest;
- README.md: what you are reading;
- LICENSE: MIT;
- goreleaser.yml: the GoReleaser configuration;
- magefile.go: contains common tasks for the project, like formating, testing, linting, etc;
- main.go: is the cli entrypoint;
To use it, you can simply:
cd $GOPATH/src/github.com/youruser
git clone [email protected]/deild/myapp.git yourapp
cd myapp
./script/setup youruser YourApp # notice the case on the second arg
It is actually a working app (that does nothing), to run it:
mage vendor
go run main.go -h
Now, you create a GitHub repository for your new app and push it:
git remote add origin https://github.com/youruser/yourapp.git
git push origin master
If you check the README file, you’ll see that there are already a few badges on the bottom, but some of them are not working. Let’s fix them!
First of all, you can read the CONTRIBUTING.md file. It is the “newcomer guide”.