- $ brew install go
- $ git clone "[email protected]:danmbeyah/GO-REST-API.git"
$ go run main.go
API is accessible at http://localhost:8080
- http://localhost:8080/users Actions: [POST/GET/PUT/DELETE] Body: {"username": "test3","email": "[email protected]","password": "password3"}
- http://localhost:8080/login Actions: [POST] Body: {"email": "[email protected]","password": "password3"}
- To run individual test
go test --run TestGetUserByID
or go test -v --run TestGetUserByID
- To run tests in a specific folder, CD into that test folder eg modeltests and:
go test -v
- To run all tests, CD into tests folder and run:
go test -v ./...