Skip to content

Releases

v0.1.0 — Initial Release

Choose a tag to compare

@glhfuck glhfuck released this 09 Nov 02:38

First public release of nasa (Nightly And Safe Adjustments) — typed, concurrency-safe dynamic configuration and feature flags for Go backed by PostgreSQL or SQLite, with an optional embedded web UI and zero external dependencies.

Highlights

  • Zero external dependencies: Built entirely on the Go 1.24 standard library (database/sql, sync/atomic, net/http, embed). Adding github.com/glhfuck/nasa introduces zero transitive dependencies to your go.mod.
  • UFO[T] (Updatable Field Object): Lock-free reads on the hot path via atomic.Pointer[T] and .Get(). Supports primitives, structs, slices, maps, pointers, time.Time, and human-readable time.Duration strings ("250ms", "1h30m").
  • Drop-in compatibility with YAML/env configs: Mix static yaml:"..." fields and live nasa:"..." fields in the same Go struct.
  • BuildRegistry: Reflects over your config struct once at startup, auto-initializes zero-value UFO fields, and maps nested structs into slash-separated keys (app/worker/batch-size).
  • Poller: Performs an initial synchronous fetch on Start(ctx) and polls t_nasa in the background. Protects services from malformed JSON, null into non-nullable types, schema drift during rollouts, and transient DB outages.
  • ServeUI (optional embedded control panel):
    • Four key states: Green (In DB & Code), Yellow (Code only — running on compiled-in default), Red (Type mismatch — DB row doesn't match Go type), and Gray (DB only).
    • Two-step diff review: Side-by-side Old -> New preview before committing changes to the database.
    • 5-second non-modal Undo on boolean switches: Instant one-click toggles with an inline countdown toast and immediate undo.
    • Two-click Reset & Delete: Safely remove DB overrides to revert keys to compiled-in defaults without confirmation modals.
    • Exact int64 precision: Preserves 64-bit integers past 2^53 end-to-end between Go and browser JS.
    • Tree & flat views, instant search (keys, values, desc tags), and light/dark themes.

Install

go get [github.com/glhfuck/nasa@v0.1.0](https://github.com/glhfuck/nasa@v0.1.0)

Full documentation and examples: README.md · pkg.go.dev/github.com/glhfuck/nasa