Help us shape the future of Go! Take the 2026 Go Developer Survey

fundamentals

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 0 Imported by: 0

README

Fundamentals for Go

Go Reference Build Release

The Go counterpart of Cratis Fundamentals: shared domain-value primitives for Arc.Go and Chronicle.Go. Instead of each framework defining incompatible values and codecs, Fundamentals.Go provides one small, standard-library-only foundation. It must never import either framework.

Status

Experimental (v0.x). Package concepts provides UUID, DateOnly, TimeOnly, TimeSpan, the Concept contract, Underlying and CheckJSON. Package correlation provides shared correlation-ID context. Package dependencyinjection provides an optional dependency-injection contract, with a default container and conformance suites; plain constructors need none of it. Start with concept authoring and recognition and dependency injection; the parity map records implemented contracts and remaining gaps.

Releases remain v0.x while the API is experimental; a minor version may contain breaking changes, with migration notes.

Installation

Requires Go 1.26 or later:

go get github.com/cratis/fundamentals.go@latest

Use the lowercase module path exactly as shown. CI checks Go 1.26 and 1.27 with GOWORK=off and GOTOOLCHAIN=local.

Development

From the repository root:

export GOWORK=off
export GOTOOLCHAIN=local
go build ./...
go vet ./...
go test -race -count=1 -timeout=3m ./...
golangci-lint run

See the contribution guide for the full checks and release conventions, and the documentation overview for scope and limitations.

Community and security

License

MIT.

Documentation

Overview

Package fundamentals is the root of the Go counterpart of Cratis Fundamentals.

Package concepts provides the shared UUID and temporal wire scalars and the typed concept contract; package correlation shares correlation IDs through context.Context; package dependencyinjection provides an optional dependency-injection contract and default container. Documentation/parity.md records the remaining gaps.

Directories

Path Synopsis
Package concepts provides portable UUID, DateOnly, TimeOnly and TimeSpan values with .NET-compatible canonical JSON strings and text codecs.
Package concepts provides portable UUID, DateOnly, TimeOnly and TimeSpan values with .NET-compatible canonical JSON strings and text codecs.
Package correlation shares operation correlation IDs through context.Context.
Package correlation shares operation correlation IDs through context.Context.
Package dependencyinjection defines container-neutral exact-type registration, resolution and scope contracts.
Package dependencyinjection defines container-neutral exact-type registration, resolution and scope contracts.
container
Package container implements the optional default dependency injection provider.
Package container implements the optional default dependency injection provider.
ditest
Package ditest provides reusable dependency injection conformance suites.
Package ditest provides reusable dependency injection conformance suites.
internal/value
Package value centralizes runtime validation for contracts and container adapters.
Package value centralizes runtime validation for contracts and container adapters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL