standardembed

package module
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package standardembed embeds the EKA standard declaration file (the root `EKA` compact consumer summary) into the binary and exposes it to the rest of the codebase.

The file is vendored from the eka-standard release asset (github.com/maleolabs/eka-standard, releases/download/v1.0/EKA) and is the single canonical copy the CLI distributes: the bootstrap engine writes its bytes into every generated repository, and the CLI's reported standard version is derived from its `Version X.Y` line — never from a hardcoded constant.

Embedding is the ADR-023 distribution pattern (a root-level package with //go:embed over the module root): the binary stays standalone and offline — `eka init` never fetches anything — and dry-run stays deterministic because the content is a compile-time resource.

The build-time version-consistency test (standardembed_test.go) locks the embedded `Version X.Y` line to the standard version the CLI conformance rules implement (exchange.SpecificationVersion).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Declaration

func Declaration() []byte

Declaration returns the embedded EKA standard declaration file bytes. The returned slice is the exact content written into generated repositories (deterministic: identical bytes on every run and every build of the same source tree).

func MustVersion

func MustVersion() string

MustVersion returns Version(), panicking when the embedded declaration does not carry a valid `Version X.Y` line. It is used for values that are structurally fixed at build time: a missing version line is a broken vendored asset and must fail loudly rather than silently report a wrong standard version.

func Version

func Version() (string, error)

Version parses the `Version X.Y` line of the embedded declaration and returns the version value (e.g. "1.0"). The parse is anchored to the file shape: line 1 must be the EKA STANDARD header and line 2 the Version X.Y line — any other shape is rejected deterministically. The embedded file is a compile-time resource, so a failure here means the vendored asset is broken and the binary must not claim a version.

Types

This section is empty.

Directories

Path Synopsis
Package bootstrap implements the official `eka init` engine: workspace discovery, bootstrap planning, the interactive wizard, repository generation from the deterministic plan, and post-generation validation.
Package bootstrap implements the official `eka init` engine: workspace discovery, bootstrap planning, the interactive wizard, repository generation from the deterministic plan, and post-generation validation.
cmd
Package cmd implements the EKA CLI as a thin Cobra command layer.
Package cmd implements the EKA CLI as a thin Cobra command layer.
eka command
Command eka is the official EKA CLI: conformance validation and repository bootstrapping.
Command eka is the official EKA CLI: conformance validation and repository bootstrapping.
ui
Package ui provides the presentation primitives of the EKA CLI.
Package ui provides the presentation primitives of the EKA CLI.
Package feedback implements the EKA feedback module (ADR-026): plain files under EKA_HOME/feedback/<id>.md carrying YAML frontmatter + markdown body, and the publish path that files a draft as a GitHub issue on the fixed target repository.
Package feedback implements the EKA feedback module (ADR-026): plain files under EKA_HOME/feedback/<id>.md carrying YAML frontmatter + markdown body, and the publish path that files a draft as a GitHub issue on the fixed target repository.

Jump to

Keyboard shortcuts

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