Skip to main content
Version: 1.1

Go packages

dispat is assembled from five Go modules, and you can import each one on its own. Parsing commit messages and rewriting dependency manifests are problems older than releases. These modules are packages first and dispat internals second, so none of them needs the CLI, a git repository, or a network.

Everything else the CLI does lives under services/dispat/internal. Go makes this unreachable from outside the module. The five packages below are the whole of the importable surface.

The packages

ModuleImport pathWhat it does
ccmegithub.com/yohimik/dispat/pkg/ccmeParses commit messages in the Conventional Commits Monorepo Extension format
scannergithub.com/yohimik/dispat/pkg/scannerReads dependency manifests into one ecosystem-neutral shape
writergithub.com/yohimik/dispat/pkg/writerRewrites those manifests in place, byte for byte
manifestgithub.com/yohimik/dispat/pkg/manifestThe vocabulary the reader and the writer share
modelsgithub.com/yohimik/dispat/pkg/modelsThe typed model of the configuration file

How they fit together

The dependency shape is deliberately shallow, and ccme depends on nothing outside the standard library. Both scanner and writer import manifest to keep them covering exactly the same formats. models imports ccme because a resolved configuration carries a parser configuration inside it.

That leaves two natural pairs. scanner and writer are the manifest halves, where one reads a version and the other writes it, and both agree byte for byte on where the value sits because manifest decides for them. ccme and models are the input halves, where one reads the commit messages and the other describes the file configuring how they are read.

Installing

Each module is versioned and tagged separately. They use the layout Go expects for a multi-module repository. A tag reads pkg/ccme/v1.0.0 rather than a repository-wide version:

go get github.com/yohimik/dispat/pkg/ccme
go get github.com/yohimik/dispat/pkg/scanner
go get github.com/yohimik/dispat/pkg/writer
go get github.com/yohimik/dispat/pkg/manifest
go get github.com/yohimik/dispat/pkg/models

Taking one package does not pull the others in unless it needs them. None of them pulls in the CLI.

The same work from the command line

Three of the packages have a command that wraps the package with a report attached. You do not need a configuration file or a git repository to run them:

Run these commands to see what a package does with your own files before you import it.