id

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(prefix string) (string, error)

New returns a stable DevStrap-style identifier with a short type prefix.

func Valid

func Valid(prefix, value string) bool

Valid reports whether value is a canonical identifier as produced by New for the given prefix: "<prefix>_" followed by exactly 32 lowercase hex digits. It is intentionally strict — user-supplied ids (e.g. `init --workspace-id`) must match the minted shape byte-for-byte so a truncated or re-cased paste is rejected before it becomes a divergent hub prefix (P4-SEC-07 pairing).

Types

This section is empty.

Jump to

Keyboard shortcuts

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