Skip to content

Instantly share code, notes, and snippets.

@eliasson
Created August 31, 2014 20:12
Show Gist options
  • Save eliasson/e572b28c9a0eef0b2763 to your computer and use it in GitHub Desktop.
Save eliasson/e572b28c9a0eef0b2763 to your computer and use it in GitHub Desktop.
Example Makefile for small projects in golang
PACKAGES := \
github.com/eliasson/foo \
github.com/eliasson/bar
DEPENDENCIES := github.com/eliasson/acme
all: build silent-test
build:
go build -o bin/foo main.go
test:
go test -v $(PACKAGES)
silent-test:
go test $(PACKAGES)
format:
go fmt $(PACKAGES)
deps:
go get $(DEPENDENCIES)
@kanapuli
Copy link

kanapuli commented Jun 4, 2018

Simple and clear. Helped a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment