go-template is a Go project template that provides a basic structure and boilerplate code for starting a new Go project. It follows the recommended Go project layout and includes common files and directories to help you get started quickly.
- Project structure: Follows a standard project layout to organize your Go code.
- Dependency management: Utilizes Go modules for managing dependencies.
- Testing setup: Includes a testing setup with sample test cases.
- Logging configuration: Provides a basic logging configuration using the popular logrus library.
- Configuration management: Supports configuration loading from environment variables and configuration files using viper.
- Error handling: Demonstrates error handling approaches using errors package and error wrapping.
- Build and run scripts: Includes convenient scripts for building and running the project.
- Docker support: Contains a Dockerfile for containerization.
Before using this project, make sure you have the following installed:
- Go (1.16+)
- Docker (optional)
To get started with the go-template project, follow these steps:
-
Clone the repository:
git clone https://github.com/doxanocap/go-template.git
-
Run docker compose file:
docker-compose up
Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please create an issue or submit a pull request.
This project is licensed under the MIT License.