Modern Web Application with Golang "Keep it simple, stupid"
- HTTP Middleware Echo
- ORM library gorm
- Configuration env
- Load ENV variables from .env file godotenv
- Payload validation validator
- Cache Redis
- Localization gotext
- Database CockroachDB
- Releasing goreleaser
Building From Source
This project requires Go +1.13 and Go module support.
To build the project run:
Bootstrap infrastructure and run application
This project requires docker and docker compose to run the required services.
- To run the services:
- To create database
docker run --network="host" -it cockroachdb/cockroach:v19.2.1 sql --insecure -e "$(cat ./scripts/create.db.sql)"
Build web application
go run main.go
- Navigate to users list page
CI and Static Analysis
All pull requests will run through CI, which is currently hosted by Github-CI. Community contributors should be able to see the outcome of this process by looking at the checks on their PR. Please fix any issues to ensure a prompt review from members of the team.
This project uses the following static analysis tools. Failure during the running of any of these tools results in a failed build. Generally, code must be adjusted to satisfy these tools, though there are exceptions.
- go vet checks for Go code that should be considered incorrect.
- go fmt checks that Go code is correctly formatted.
- golangci-lint checks for things like: unused code, code that can be simplified, code that is incorrect and code that will have performance issues.
- go mod tidy ensures that the source code and go.mod agree.
When a new tag is pushed, the version is released with goreleaser.
$ git tag -a v0.1.0 -m "First release" $ git push origin v0.1.0 # => want to release v0.1.0
- IDE plugin vscode-go
- Administration of cockroachdb DBeaver
- REST client Postman
- Go testing in the browser go-convey
- Benchmarking bombardier
$ godoc github.com/starptech/go-web/pkg/controller $ godoc -http=:6060
Visit localhost:6060 and search for
$ bombardier -c 10 -n 10000 http://localhost:8080/users
Cockroachdb Cluster overview
Deploy on Heroku
There is no documentation for this package.