Skip to content
This repository has been archived by the owner on Nov 6, 2021. It is now read-only.

Some Make commands

B1nj0y edited this page Jan 11, 2018 · 2 revisions

A Makefile will be generated at same time when we generate a Golang app.

The Makefile provides some commands for convenient uses:

  • make build: compile the Go app as a binary. Same as go build and just a go build behind the scenes.
  • make clean: delete those files compiled by make build or go build.
  • make run: make build firstly and run the compiled binary.
  • make test: run testing for the tests in the current directory and all sub-directories.
  • make deps: install all the Go packages the app depends on by default.
  • make image: build a Docker image for the app use a generated Dockerfile.
Clone this wiki locally