This example API, crafted with the Gin framework and Gorm, stands as a mature solution for effective service management within Golang applications. By embracing Go's conventions, the project structure adheres to best practices. The REST architecture is implemented, aligning with Golang standards to ensure clean semantics and maintainability.
Before running the application, ensure you have the necessary dependencies installed. Follow the steps below:
-
Install Go (Golang):
Download and install Go from golang.org. Verify the installation by running:
go version
-
Download Dependencies:
Run the following command to download the project dependencies:
go mod download
go run .\cmd\server\main.go
go test -v ./test/...
# Get swag
go get -u github.com/swaggo/swag/cmd/swag
# Generate docs
swag init --dir cmd/server --parseDependency --output docs
Contributions are welcome! Please feel free to open issues or pull requests to suggest improvements or add new features.
This project is licensed under the MIT License.