gh

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package gh implements a format.Formatter for the GitHub CLI (gh). It claims every gh invocation and dispatches internally on the first two non-flag arguments (e.g. "pr", "list"), since the registry holds one entry per program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter struct{}

Formatter renders gh command output.

func New

func New() *Formatter

New constructs a gh Formatter.

func (*Formatter) Aggressive

func (f *Formatter) Aggressive(ctx context.Context, in format.Input) (format.Rendered, error)

Aggressive dispatches to a per-subcommand structured renderer.

func (*Formatter) Descriptor

func (f *Formatter) Descriptor() format.Match

Descriptor claims all gh invocations; subcommand dispatch happens inside Aggressive/Relaxed.

func (*Formatter) Relaxed

func (f *Formatter) Relaxed(ctx context.Context, in format.Input) (format.Rendered, error)

Relaxed applies heuristic line-level filtering to any gh subcommand.

Jump to

Keyboard shortcuts

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