Version constants: the specification and the module
- datekeys.SpecVersion ("0.8.2") names the specification the module
implements. A test ties it to the spec file, its title and
spec/README.md, and TestCatalogueMatchesSpec and the vector files use
it (testkit.SpecVersion now aliases it), so the vectors regenerate
unchanged.
- datekeys.Version() is the version of the module as the go command
recorded it. That is a tag, or for a binary built in a checkout the
pseudo-version of its commit (for example
v0.0.0-20260928105528-9ac9cd952f04), or (devel) when it is unknown, as
in tests or under a replace directive to a directory. It works as the
main module and as a dependency, whatever the module path, which it
reads from the root package.
- `datekeys version` (also -version and --version) prints both and the
Go toolchain.
- README.md and README.es.md explain the three versions (format,
specification, module) and what the code on main covers.
traceability §70 and CHANGELOG follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 week ago
|
|
|
package datekeys
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"reflect"
|
|
|
|
|
"runtime/debug"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// SpecVersion is the version of the DateKeys Protocol Specification that this
|
Spec v0.11 approved: the text of the review, SpecVersion 0.11 and its SHA-256
The author approved the text and the six open decisions on 1 October 2026.
The spec says now what the review left open: the form of the CMS signature
and of the TSTInfo field by field, the ESSCertIDv2 with SHA-256 written, the
padding of the locator at its boundaries, base32 CIDs, the addresses read
without decoding, the issuer shown by the rules of the holder, and the area
decided after the signatures. SpecVersion is 0.11, the records of fixtures
and vectors say so, and decrypt shows an mtime later than a valid seal as an
inconsistency, which 29.7 asks as a SHOULD.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
6 days ago
|
|
|
// module implements: spec/DateKeys_Protocol_Specification_v0.11.md, tagged
|
|
|
|
|
// spec-v0.11 in its repository. It is neither the version of the module (see
|
|
|
|
|
// Version) nor the versions inside the objects: the capsule format, 1 to 3,
|
|
|
|
|
// and the schema versions (spec §22, §70).
|
|
|
|
|
const SpecVersion = "0.15"
|
Version constants: the specification and the module
- datekeys.SpecVersion ("0.8.2") names the specification the module
implements. A test ties it to the spec file, its title and
spec/README.md, and TestCatalogueMatchesSpec and the vector files use
it (testkit.SpecVersion now aliases it), so the vectors regenerate
unchanged.
- datekeys.Version() is the version of the module as the go command
recorded it. That is a tag, or for a binary built in a checkout the
pseudo-version of its commit (for example
v0.0.0-20260928105528-9ac9cd952f04), or (devel) when it is unknown, as
in tests or under a replace directive to a directory. It works as the
main module and as a dependency, whatever the module path, which it
reads from the root package.
- `datekeys version` (also -version and --version) prints both and the
Go toolchain.
- README.md and README.es.md explain the three versions (format,
specification, module) and what the code on main covers.
traceability §70 and CHANGELOG follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 week ago
|
|
|
|
|
|
|
|
// modulePath is the path of this module: the import path of its root
|
|
|
|
|
// package, whatever the module is called.
|
|
|
|
|
var modulePath = reflect.TypeFor[Error]().PkgPath()
|
|
|
|
|
|
|
|
|
|
// Version returns the version of this module in the running program, as the
|
|
|
|
|
// go command recorded it: a release tag such as v0.1.0; a pseudo-version,
|
|
|
|
|
// which names the commit, for a program built in a checkout of the module;
|
|
|
|
|
// or "(devel)" when it is unknown, as in tests or under a replace directive
|
|
|
|
|
// that points to a directory.
|
|
|
|
|
func Version() string {
|
|
|
|
|
info, ok := debug.ReadBuildInfo()
|
|
|
|
|
if !ok {
|
|
|
|
|
return "(devel)"
|
|
|
|
|
}
|
|
|
|
|
return versionIn(info)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func versionIn(info *debug.BuildInfo) string {
|
|
|
|
|
m := &info.Main
|
|
|
|
|
if m.Path != modulePath {
|
|
|
|
|
m = nil
|
|
|
|
|
for _, d := range info.Deps {
|
|
|
|
|
if d.Path == modulePath {
|
|
|
|
|
m = d
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if m != nil && m.Replace != nil {
|
|
|
|
|
m = m.Replace
|
|
|
|
|
}
|
|
|
|
|
if m == nil || m.Version == "" {
|
|
|
|
|
return "(devel)"
|
|
|
|
|
}
|
|
|
|
|
return m.Version
|
|
|
|
|
}
|