cli

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli contains runtime helpers for generated HTTP command-line clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasHelpArg

func HasHelpArg(args []string) bool

HasHelpArg reports whether args request Kong context-sensitive help.

func Parse

func Parse(commandLine any, program string, args []string) (string, error)

Parse parses args into commandLine and returns the selected command path.

func UnmarshalJSON added in v1.10.0

func UnmarshalJSON(data []byte, value any) error

UnmarshalJSON decodes a generated CLI flag using JSON v2 semantics with support for boolean map keys named "true" and "false", including nested maps and named boolean types. Custom JSON and text decoders take precedence.

func UnmarshalNonNullableJSON added in v1.10.0

func UnmarshalNonNullableJSON[T any](data []byte, value *T) error

UnmarshalNonNullableJSON decodes one non-nullable CLI JSON body while retaining JSONOptions and custom decoder behavior. Optional owns the root null contract.

Types

This section is empty.

Jump to

Keyboard shortcuts

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