cmd/: Application entry points (main packages)pkg/: Public libraries (importable by other projects)internal/: Internal application code (not exposed publicly)config/: Configuration files or modulestest/integration/: Integration teststest/unit/: Unit tests
-
Initialize the Project:
- Run
make init-projectto install all necessary Go tools and tidy up the dependencies.
- Run
-
Install Dependencies:
- Run
make depsto install and update the project dependencies.
- Run
-
Format Code:
- Use
make formatto automatically format all Go source files according to Go standards.
- Use
-
Lint Code:
- Use
make lintto check the code for any style issues or potential bugs. This requiresgolangci-lintto be installed, which is handled bymake init-project.
- Use
-
Run the Application:
- Use
make runto build and run the application.
- Use
-
Run Tests:
- Use
make testto run the unit tests. - Use
make test-integrationto run the integration tests (requires integration tests to be set up). - Use
make test-allto run all tests (unit and integration).
- Use
-
Build the Application:
- Use
make buildto compile the application into a binary for your current OS and architecture.
- Use
-
Create a Binary Distribution:
- Use
make distto create a.tgzand.ziparchive of the application binary for your current OS and architecture. These archives will be placed in thedist/directory.
- Use
-
Create Distributions for Multiple Platforms:
- Use
make dist-allto create.tgzand.ziparchives for the most common OS and architecture combinations (Linux, macOS, and Windows on amd64 and arm64 architectures). These archives will be placed in thedist/directory.
- Use
-
Clean Up:
- Use
make cleanto remove previous build artifacts and test cache.
- Use
-
Tidy Dependencies:
- Use
make tidyto clean up thego.modandgo.sumfiles by removing unused dependencies.
- Use
The VersionBump project uses itself to manage its version strings. The configuration file versionbump.yaml contains
the current version number and the files that need to be updated with the new version. The version.go file contains
the version number as a constant, and the README.md file contains the version number in the "Latest Version" section.