Need help with go-makefile-example?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

azer
256 Stars 43 Forks Do What The F*ck You Want To Public License 15 Commits 3 Opened issues

Description

Example Makefile for Go projects

Services available

!
?

Need anything else?

Contributors list

# 70,337
golang
elm
micro-l...
Jupyter...
6 commits
# 121,574
k8s
CSS
Zsh
helm-ch...
4 commits

go-makefile-example

Example project for the Makefile explained in 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 start

It 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 help

Choose 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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.