Go Dito is a repository of utilitary packages written in Go, designed to improve development experience of Dito's squads.
This repository is designed as a Monorepo. Each root's folder (except .github/
) represents an individual and independent package.
Every package is automatically versioned using Semantic Release default rules. Every semantic commit pushed to master
branch, that updates a package codebase, will generate a new release version for its package. If a commit does not touches the code base of a package, its version must not be increased. A single commit can increase version of multiple packages when it touches them all.
Also, this repository uses a new feature of Go 1.18 called Workspaces.
go get github.com/ditointernet/go-dito/<package-name>
mkdir <package-name>
cd <package-name>
go mod init github.com/ditointernet/go-dito/<package-name>
;package.json
file with the following data:
{
"name": "<package-name>",
"private": true
}
cd ..
go work use ./<package-name>
;master
or beta
branch;README.md
file;examples
folder, that illustrates how to use your package;<type>(<scope>): <short summary>
Type must be one of the following:
Commits with a footer message containing the phrase BREAKING CHANGE:
indicates a Major release.
You can read more about this here.
Notice that, if your changes increases the Major version of your package, you MUST update package's go.mod properly. For instance, if there is a BREAKING CHANGE to package foo
, that increases its version to 2.0.0
, you MUST update foo/go.mod
with:
module github.com/ditointernet/go-dito/foo
-> module github.com/ditointernet/go-dito/foo/v2
This need is required by Go design.
No version will be created.
Just merge your changes into beta
branch.