This app serves as an exam for my Golang developer application.
- Clone the repository.
- Run the program using the following command in your command prompt or terminal:
go run cmd/api/main.go
You can use curl
to make a sample request to the application. Here's an example:
curl --location --request GET 'http://127.0.0.1:8080/api/v1/retrieveUsers' \
--header 'Content-Type: application/json' \
--data '{
"usernames": ["TheAlgorithms", "nonExistingId12345", "torvalds", "bradtraversy", "torvalds", "michaelliao", "mamontes1788"]
}'
- Run unit tests (optional)
- Handler Level
go test ./internal/network/http/handler
- Service Level
go test ./internal/core/service