new-api-dual-mode

command
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 13 Imported by: 0

README

New API: Dual Mode Command

This example shows a single command implementing both:

  • cmds.BareCommand (Run) for classic, human output
  • cmds.GlazeCommand (RunIntoGlazeProcessor) for structured output

Run:

go run ./cmd/examples/new-api-dual-mode status
go run ./cmd/examples/new-api-dual-mode status --verbose

# Switch to glaze mode
go run ./cmd/examples/new-api-dual-mode status --with-glaze-output
go run ./cmd/examples/new-api-dual-mode status --with-glaze-output --output json

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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