hanko

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package hanko adapts the Hanko CLI for tsuba. We shell out via os/exec rather than importing Hanko as a Go package because Hanko's validator lives in an internal/ path and we do not want to force Hanko to commit to a stable API surface just so Tsuba can call it. See docs/research/phase-1-spec.md section 8 for the reasoning.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInstalled = errors.New("hanko is not installed or not on PATH")

ErrNotInstalled is returned when the hanko binary is not found on PATH. Callers (CLI, doctor) turn this into a clear user-facing message.

Functions

func Available

func Available() bool

Available reports whether the hanko binary is on PATH.

func Validate

func Validate(targetDir string) (exitCode int, stdout string, err error)

Validate runs `hanko check <targetDir>` and returns exit code + stdout. When exit is non-zero, stdout contains the pretty error report; we do not parse JSON here (the CLI can ask Hanko for --json itself if it wants structured output). Returns ErrNotInstalled when hanko is missing, so the doctor / validate commands can print a friendly note.

func Version

func Version() string

Version returns the `hanko version` string or empty if hanko is not installed. Used by `tsuba doctor`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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