Documentation
¶
Overview ¶
Package glacier is the umbrella for the Glacier Go framework : a curated suite of consumable libraries that make Go development easy and just work.
Glacier ships fourteen packages organized in three tiers (kernel / mid / leaves) with no cyclic dependencies. The full architecture is documented in the framework-shape spec at specs/0002-framework-shape.md.
Less plumbing. More Go.
Example ¶
Example shows the umbrella package's role: it is a documentation anchor for the framework. Users import the leaf packages directly (errs, conf, cli, mock, httpmock, term, fixture, ...). The root package itself has no callable surface; see specs/0002-framework-shape.md for the layered dependency map.
package main
import (
"fmt"
"github.com/nathanbrophy/glacier/errs"
)
func main() {
err := errs.Sentinel("example: synthetic")
fmt.Println(err.Error())
}
Output: example: synthetic
Directories
¶
| Path | Synopsis |
|---|---|
|
Package assert provides Glacier's test assertions and runtime Must helpers.
|
Package assert provides Glacier's test assertions and runtime Must helpers. |
|
require
Package require mirrors every assertion in the parent assert package with t.Fatal semantics so a failing assertion immediately halts the test.
|
Package require mirrors every assertion in the parent assert package with t.Fatal semantics so a failing assertion immediately halts the test. |
|
Package cache is Glacier's generic key-value cache.
|
Package cache is Glacier's generic key-value cache. |
|
Package cli is a first-class, gold-standard CLI builder : designed for any consumer building a CLI in Go, not as plumbing for Glacier's own SDK binary.
|
Package cli is a first-class, gold-standard CLI builder : designed for any consumer building a CLI in Go, not as plumbing for Glacier's own SDK binary. |
|
gen
Package gen is the codegen library for the Glacier CLI builder.
|
Package gen is the codegen library for the Glacier CLI builder. |
|
cmd
|
|
|
cligen
command
Command cligen is the Glacier CLI code generator.
|
Command cligen is the Glacier CLI code generator. |
|
glacier
command
Command glacier is the Glacier SDK binary.
|
Command glacier is the Glacier SDK binary. |
|
glacier/commands
Package commands implements the nine Glacier SDK commands.
|
Package commands implements the nine Glacier SDK commands. |
|
glacier/internal/benchcmp
Package benchcmp parses Go benchmark output and compares results against a stored baseline file.
|
Package benchcmp parses Go benchmark output and compares results against a stored baseline file. |
|
glacier/internal/castgen
Package castgen records terminal sessions of the SDK binary into asciinema v2 .cast files and renders a static .svg snapshot of the final frame.
|
Package castgen records terminal sessions of the SDK binary into asciinema v2 .cast files and renders a static .svg snapshot of the final frame. |
|
glacier/internal/castgen/cmd
command
Command castgen records terminal sessions of the SDK and writes both asciinema v2 .cast files and self-contained .svg snapshots under site/public/casts/.
|
Command castgen records terminal sessions of the SDK and writes both asciinema v2 .cast files and self-contained .svg snapshots under site/public/casts/. |
|
glacier/internal/completions
Package completions provides shell-completion scripts for the glacier binary.
|
Package completions provides shell-completion scripts for the glacier binary. |
|
glacier/internal/explain
Package explain provides structured reference topics for the glacier explain command.
|
Package explain provides structured reference topics for the glacier explain command. |
|
glacier/internal/explaingen
Package explaingen is the build-time generator that renders explain topic files from accepted spec sections.
|
Package explaingen is the build-time generator that renders explain topic files from accepted spec sections. |
|
glacier/internal/explaingen/cmd
command
explaingen is the build-time tool that renders explain topic files from accepted spec sections.
|
explaingen is the build-time tool that renders explain topic files from accepted spec sections. |
|
glacier/internal/figgen
Package figgen renders project-name banners in a block-character style inspired by ANSI Shadow figlet font.
|
Package figgen renders project-name banners in a block-character style inspired by ANSI Shadow figlet font. |
|
glacier/internal/ghreleases
Package ghreleases fetches release metadata from the GitHub Releases API using the Glacier httpc package.
|
Package ghreleases fetches release metadata from the GitHub Releases API using the Glacier httpc package. |
|
glacier/internal/mascots
Package mascots provides the curated library of six Glacier mascots.
|
Package mascots provides the curated library of six Glacier mascots. |
|
glacier/internal/profile
Package profile provides a one-call helper for enabling pprof CPU, heap, and goroutine profiling.
|
Package profile provides a one-call helper for enabling pprof CPU, heap, and goroutine profiling. |
|
glacier/internal/report
Package report writes kaomoji-prefixed status lines to a configurable writer.
|
Package report writes kaomoji-prefixed status lines to a configurable writer. |
|
glacier/internal/sdkerr
Package sdkerr defines SDK-internal error types and sentinel values.
|
Package sdkerr defines SDK-internal error types and sentinel values. |
|
glacier/internal/shimmer
Package shimmer renders the "GLACIER" wordmark with a scrolling aurora gradient per spec 0032 D-S58.
|
Package shimmer renders the "GLACIER" wordmark with a scrolling aurora gradient per spec 0032 D-S58. |
|
glacier/internal/vibetips
Package vibetips provides the 12-tip registry shown by glacier vibe.
|
Package vibetips provides the 12-tip registry shown by glacier vibe. |
|
Package concur is the Glacier answer to "I need a Mutex / errgroup / semaphore / sync.Pool / sync.Once / sync.WaitGroup : but ctx-aware, observable, and friendly to Glacier's error story." Production builds are byte-equivalent to stdlib equivalents where possible (zero overhead is the rule, not an aspiration).
|
Package concur is the Glacier answer to "I need a Mutex / errgroup / semaphore / sync.Pool / sync.Once / sync.WaitGroup : but ctx-aware, observable, and friendly to Glacier's error story." Production builds are byte-equivalent to stdlib equivalents where possible (zero overhead is the rule, not an aspiration). |
|
Package conf is the Glacier answer to "I have a few config sources (defaults, JSON file, env vars, flags) and a few struct-shaped config values I want them to populate." Two complementary APIs: a registration pattern where packages declare typed config structs with sensible defaults and conf.Load walks every registered struct and populates from layered sources; and a one-shot Decode[T] for programs with a single root config struct.
|
Package conf is the Glacier answer to "I have a few config sources (defaults, JSON file, env vars, flags) and a few struct-shaped config values I want them to populate." Two complementary APIs: a registration pattern where packages declare typed config structs with sensible defaults and conf.Load walks every registered struct and populates from layered sources; and a one-shot Decode[T] for programs with a single root config struct. |
|
Package errs provides the helpers underlying Glacier's error story: chain-preserving wrapping with optional stack capture, nil-aware joining, tree-walking iteration, library-register-validating sentinels, multi-target matching, retry markers, and stable error codes.
|
Package errs provides the helpers underlying Glacier's error story: chain-preserving wrapping with optional stack capture, nil-aware joining, tree-walking iteration, library-register-validating sentinels, multi-target matching, retry markers, and stable error codes. |
|
Package fixture provides test-resource management : the catch-all for everything tests need beyond stdlib testing and Glacier's assert package.
|
Package fixture provides test-resource management : the catch-all for everything tests need beyond stdlib testing and Glacier's assert package. |
|
Package fluent is Glacier's LINQ-equivalent: chainable, lazy, composable operators over Go 1.23+ iterators (iter.Seq[T] and iter.Seq2[K, V]).
|
Package fluent is Glacier's LINQ-equivalent: chainable, lazy, composable operators over Go 1.23+ iterators (iter.Seq[T] and iter.Seq2[K, V]). |
|
Package httpc is a first-class HTTP client wrapper around stdlib *http.Client.
|
Package httpc is a first-class HTTP client wrapper around stdlib *http.Client. |
|
Package httpmock provides a programmable http.RoundTripper for testing code that uses *http.Client.
|
Package httpmock provides a programmable http.RoundTripper for testing code that uses *http.Client. |
|
gen
Package gen is the codegen library for the Glacier httpmock package.
|
Package gen is the codegen library for the Glacier httpmock package. |
|
internal
|
|
|
lockfile
Package lockfile provides cooperative cross-process advisory file locking.
|
Package lockfile provides cooperative cross-process advisory file locking. |
|
reflectx
Package reflectx provides reflection helpers shared by mock, fluent, and conf.
|
Package reflectx provides reflection helpers shared by mock, fluent, and conf. |
|
safefile
Package safefile provides path-canonicalization and safe file-open helpers used by fixture/ to prevent path-traversal attacks on test-data directories.
|
Package safefile provides path-canonicalization and safe file-open helpers used by fixture/ to prevent path-traversal attacks on test-data directories. |
|
safejson
Package safejson wraps encoding/json with security guards for untrusted input.
|
Package safejson wraps encoding/json with security guards for untrusted input. |
|
sigh
Package sigh wires OS signals into the context lifecycle.
|
Package sigh wires OS signals into the context lifecycle. |
|
Package log provides Glacier's slog conventions: default text and JSON handlers with stable attribute ordering and TTY-aware color, two extra levels (Trace and Notice), context-based attribute attachment, explicit logger injection and retrieval, and a Redact helper for secret marking.
|
Package log provides Glacier's slog conventions: default text and JSON handlers with stable attribute ordering and TTY-aware color, two extra levels (Trace and Notice), context-based attribute attachment, explicit logger injection and retrieval, and a Redact helper for secret marking. |
|
Package mock provides interface mocking for tests in two complementary modes.
|
Package mock provides interface mocking for tests in two complementary modes. |
|
gen
Package gen is the codegen library for the Glacier mock package.
|
Package gen is the codegen library for the Glacier mock package. |
|
Package obs provides Glacier's OpenTelemetry-based observability : metrics and traces.
|
Package obs provides Glacier's OpenTelemetry-based observability : metrics and traces. |
|
Package option provides the canonical functional-options framework used by every Glacier package configurable at construction.
|
Package option provides the canonical functional-options framework used by every Glacier package configurable at construction. |
|
Package term provides Glacier's terminal-interaction layer: TTY capability detection, ANSI color and style primitives (with NO_COLOR and GLACIER_NO_COLOR support), Unicode glyph registry with ASCII fallback, beauty-writer helpers (box layout, alignment, text wrapping, column formatting, banner rendering), interactive prompts (text, password, confirm, select, multi-select), and the Animator : a coordinating frame-loop that renders progress bars and spinners while buffering log output above the animation so log lines never tear the display.
|
Package term provides Glacier's terminal-interaction layer: TTY capability detection, ANSI color and style primitives (with NO_COLOR and GLACIER_NO_COLOR support), Unicode glyph registry with ASCII fallback, beauty-writer helpers (box layout, alignment, text wrapping, column formatting, banner rendering), interactive prompts (text, password, confirm, select, multi-select), and the Animator : a coordinating frame-loop that renders progress bars and spinners while buffering log output above the animation so log lines never tear the display. |
|
Package tests holds integration-level verification tests for the Glacier SDK spec (0032).
|
Package tests holds integration-level verification tests for the Glacier SDK spec (0032). |
Click to show internal directories.
Click to hide internal directories.