Skip to content
Snippets Groups Projects
Commit 90e68cb7 authored by gjahn's avatar gjahn
Browse files

Rework README and add note on building static vs. dynamic binary

parent 612b5e98
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@ $(BIN_DIR)/artifact.bin:
.PHONY: build-linux
build-linux: export GOOS := linux
build-linux: export GOARCH := amd64
build-linux: export CGO_ENABLED := 0
build-linux: $(BIN_DIR)/artifact.bin
......
Webservice
==========
A Go-based simple web service meant to be the subject for any tutorial
or maybe even the project work.
A Go-based simple web service meant to be the subject of any tutorial
or even used the project work.
__Prerequisites:__
#### Prerequisites:
* Go toolchain (install via system package manager or [by hand](https://go.dev/doc/install))
__Primary interactions:__
#### Build
1. Install dependencies: `go get -t ./...`
2. Run locally: `go run .`
3. Execute unit tests: `go test -race -v ./...`
4. Build artifact: `go build -o ./artifact.bin ./*.go`
To build for another platform, set `GOOS` and `GOARCH`. For more details,
please refer to the `Makefile`.
To build for another platform, set `GOOS` and `GOARCH`. To yield a static binary (fully
self-contained, no dynamic linking) set `CGO_ENABLED=0`. For more details, please refer
to the [Makefile](./Makefile).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment