Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azer/go-makefile-example
Example Makefile for Go projects
https://github.com/azer/go-makefile-example
Last synced: 20 days ago
JSON representation
Example Makefile for Go projects
- Host: GitHub
- URL: https://github.com/azer/go-makefile-example
- Owner: azer
- License: wtfpl
- Created: 2018-08-19T09:32:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-27T09:12:05.000Z (almost 5 years ago)
- Last Synced: 2024-12-07T00:15:56.768Z (3 months ago)
- Language: Makefile
- Homepage: https://kodfabrik.com/journal/a-good-makefile-for-go/
- Size: 10.7 KB
- Stars: 263
- Watchers: 9
- Forks: 39
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-makefile-example
Example project for the Makefile explained in [A Good Makefile for Go](https://kodfabrik.com/journal/a-good-makefile-for-go/) blog post.
## Setup
Run following commands to try it out:
* git clone https://github.com/azer/go-makefile-example.git
* cd go-makefile-example
* go get github.com/azer/yolo (needed for file watch)
* make install
* make startIt should now be running at :7777 (defined in `.env` file). You can try making a change and
see how the server will get recompiled and restarted automatically.## Manual
Run `make help` to list available commands:
```
λ make helpChoose a command run in go-makefile-example:
install Install missing dependencies. Runs `go get` internally. e.g; make install get=github.com/foo/bar
start Start in development mode. Auto-starts when code changes.
stop Stop development mode.
watch Run given command when code changes. e.g; make watch run="echo 'hey'"
compile Compile the binary.
exec Run given command, wrapped with custom GOPATH. e.g; make exec run="go test ./..."
clean Clean build files. Runs `go clean` internally.
```