A simple KV from the O'Reilly, Cloud Native Go book (Matthew A. Titmus)
make helpTo have all make commands
benchmark Run benchmark tests 🚄
check-editorconfig Use to check if the codebase follows editorconfig rules
check-format Used by CI to check if code is formatted
clean Clean your artifacts 🧼
compile Compile for the local architecture ⚙
doc Launch the offline Go documentation 📚
docker Docker run 🛠
dockerbuild Docker build 🛠
dockerfull Docker build and run 🛠
format Format the code using gofmt
fuzz Run fuzzing tests 🌀
goreleaser Run goreleaser directly at the pinned version 🛠
help Show help messages for make targets
install Install the program to /usr/bin 🎉
lint Runs the linter
mod Go mod things
run Run the server
sec Go Security checks code for security issues 🔒
test 🤓 Run go testsAs an example:
❯ make dockerfull
docker build -t gokvs .
[+] Building 5.5s (16/16) FINISHED
[...]
docker run -it --rm -p 8008:8080 gokvs
Server: GoKVs - Community
Version: v0.0.1-SNAPSHOT
Git commit: 54a8d74ea3cf6fdcadfac10ee4a4f2553d4562f6q
Built: Thu Jan 1 01:00:00 CET 1970
2024/10/26 20:14:31 0 events replayed
2024/10/26 20:14:31 Server running on port 8080
^C2024/10/26 20:14:36
2024/10/26 20:14:36 Caught the following signal: interrupt
2024/10/26 20:14:36 Gracefully shutting down server..
2024/10/26 20:14:36 Server stopping...
2024/10/26 20:14:36 Server stopped
2024/10/26 20:14:36 Gracefully shutting down TransactionLogger...
2024/10/26 20:14:36 FileTransactionLogger closedWhen you're ready, start your application by running:
docker compose up --build.
Your application will be available at http://localhost:8080.
First, build your image, e.g.: docker build -t myapp ..
If your cloud uses a different CPU architecture than your development
machine (e.g., you are on a Mac M1 and your cloud provider is amd64),
you'll want to build the image for that platform, e.g.:
docker build --platform=linux/amd64 -t myapp ..
Then, push it to your registry, e.g. docker push myregistry.com/myapp.
Consult Docker's getting started docs for more detail on building and pushing.
Works on my machine - and yours ! Spin up pre-configured, standardized dev environments of this repository, by clicking on the button below.
- Like in the book, currently: Key/Value only text, without spaces
- Mutation testing with avito-tech/go-mutesting and gremlins
- UTF-8/space/all chars acceptation as key or value
- Implement Continuous Profiling/Go telemetry with Otel with global registry or Pyroscope?
- Use Jaeger, Coroot for telemetry
- Use jub0bs/fcors for security improvment
- Use Qovery / DevoxxFR2023 workshop to improve the DevX?
- Enforce tests with go-fault: Fault injection library in Go using standard http middleware
Licensed under the MIT License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License here.
If needed some help, there are a "Licenses 101" by FOSSA, a Snyk explanation of MIT license and a French conference talk by Jean-Michael Legait about licenses.
Open source management report powered by FOSSA
If you have any questions or suggestions regarding the project, feel free to reach out to our team in the GitHub issues.

