Documentation ¶
Overview ¶
Package snmp implements the 'agent snmp' subcommand.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OptionsFlag ¶
type OptionsFlag[T any] struct { // contains filtered or unexported fields }
OptionsFlag is an implementation of pflag.Value that complains when set to an invalid option.
func Flag ¶
func Flag[T any](options *snmpparse.Options[T], target *string) OptionsFlag[T]
Flag creates a flag using these options and storing the selected choice in target.
func TypedFlag ¶
func TypedFlag[T any](options *snmpparse.Options[T], target *string, typeName string) OptionsFlag[T]
TypedFlag is the same as Flag but lets you customize how the type of flag is shown in the help.
func (OptionsFlag[T]) Set ¶
func (a OptionsFlag[T]) Set(p string) error
Set sets the value, returning an error if the given choice isn't valid.
func (OptionsFlag[T]) String ¶
func (a OptionsFlag[T]) String() string
String returns a string representation of this value.
func (OptionsFlag[T]) Type ¶
func (a OptionsFlag[T]) Type() string
Type is how the value is represented in the auto-generated help.
Click to show internal directories.
Click to hide internal directories.