Help us shape the future of Go! Take the 2026 Go Developer Survey

ctl

package
v1.0.109 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 6 Imported by: 8

Documentation

Overview

Package ctl provides Kong-based CLI helpers (version flag, bool-pointer).

Index

Constants

This section is empty.

Variables

View Source
var BoolPtrMapper = kong.TypeMapper(reflect.TypeOf(&b), boolPtrMapper{})

BoolPtrMapper is an option to register a mapper to *bool type flag

Functions

This section is empty.

Types

type VersionFlag

type VersionFlag string

VersionFlag is a flag to print version

func (VersionFlag) BeforeApply

func (v VersionFlag) BeforeApply(app *kong.Kong, vars kong.Vars) error

BeforeApply is executed before context is applied

func (VersionFlag) Decode

func (v VersionFlag) Decode(_ *kong.DecodeContext) error

Decode the flag

func (VersionFlag) IsBool

func (v VersionFlag) IsBool() bool

IsBool returns true for the flag

Jump to

Keyboard shortcuts

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