项目作者: deild

项目描述 :
Golang cli application, based on
高级语言: Go
项目地址: git://github.com/deild/myapp.git
创建时间: 2018-05-14T21:07:16Z
项目社区:https://github.com/deild/myapp

开源协议:MIT License

下载


Myapp

GitHub Release
Go Doc
Software License
Powered By: GoReleaser
SemVer

Overview

Myapp is an myapp app.

Folder structure

A basic tree would look like:

  1. .
  2. ├── commands
  3. ├── myapp.go
  4. └── myapp_test.go
  5. ├── script
  6. └── setup
  7. ├── .gitignore
  8. ├── .travis.yml
  9. ├── CONTRIBUTING.md
  10. ├── Gopkg.lock
  11. ├── Gopkg.toml
  12. ├── LICENSE
  13. ├── README.md
  14. ├── goreleaser.yml
  15. ├── magefile.go
  16. └── 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;

Starting a new project

To use it, you can simply:

  1. cd $GOPATH/src/github.com/youruser
  2. git clone git@github.com/deild/myapp.git yourapp
  3. cd myapp
  4. ./script/setup youruser YourApp # notice the case on the second arg

It is actually a working app (that does nothing), to run it:

  1. mage vendor
  2. go run main.go -h

Now, you create a GitHub repository for your new app and push it:

  1. git remote add origin https://github.com/youruser/yourapp.git
  2. 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!

Contributing to Myapp

First of all, you can read the CONTRIBUTING.md file. It is the “newcomer guide”.

Health

Travis
CodeFactor
Coverage Status
codecov
Go Report Card