Test with development database:
go test ./...
Test with Redis database:
# remove any existing redis data
rm dump.rdb
# prevent go from using cached test results
go clean -testcache
# create redis db
redis-server &
go test ./...
# stop redis db
kill $!
A swagger.json file can be generated using swag:
go install github.com/swaggo/swag/cmd/swag@latest
swag init -g api/router.go
To upgrade Houston to a later version of go, first edit the mod file:
go mod edit -go=1.23
Then run all unit tests. Finally, change the go version number in the Dockerfiles in the docker folder.
To upgrade all packages required by the Houston module:
go get -u
go mod tidy