flag

package
v0.0.0-...-4213791 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrSlice

func AddrSlice(f *pflag.FlagSet, name string, value []netip.Addr, usage string) *[]netip.Addr

AddrSlice defines a []netip.Addr flag with specified name, default value, and usage string. The return value is the address of a []netip.Addr variable that stores the value of that flag.

func AddrSliceP

func AddrSliceP(f *pflag.FlagSet, name, shorthand string, value []netip.Addr, usage string) *[]netip.Addr

AddrSliceP is like AddrSlice, but accepts a shorthand letter that can be used after a single dash.

func AddrSliceVar

func AddrSliceVar(f *pflag.FlagSet, p *[]netip.Addr, name string, value []netip.Addr, usage string)

AddrSliceVar defines a addrSlice flag with specified name, default value, and usage string. The argument p points to a []netip.Addr variable in which to store the value of the flag.

func AddrSliceVarP

func AddrSliceVarP(f *pflag.FlagSet, p *[]netip.Addr, name, shorthand string, value []netip.Addr, usage string)

AddrSliceVarP is like AddrSliceVar, but accepts a shorthand letter that can be used after a single dash.

func AddrVar

func AddrVar(f *pflag.FlagSet, p *netip.Addr, name string, value netip.Addr, usage string)

func AddrVarP

func AddrVarP(f *pflag.FlagSet, p *netip.Addr, name, shorthand string, value netip.Addr, usage string)

func PrefixVar

func PrefixVar(f *pflag.FlagSet, p *netip.Prefix, name string, value netip.Prefix, usage string)

func PrefixVarP

func PrefixVarP(f *pflag.FlagSet, p *netip.Prefix, name, shorthand string, value netip.Prefix, usage string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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