pflagext

package
v1.1.0-develop.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPathVar

func NewPathVar(value *string, allow AllowOpt, def string) *pathFlag

NewPathVar creates a path flag that will validate the path given the allowOpt.

func NewStringEnumVar

func NewStringEnumVar(value *string, allowed []string, d string) *stringEnum

NewStringEnumVar give a list of allowed flag parameters, where the second argument is the default

Types

type AllowOpt

type AllowOpt int
const (
	AllowFileAndDir AllowOpt = 0
	AllowFileOnly   AllowOpt = 1
	AllowDirOnly    AllowOpt = 2
)

Jump to

Keyboard shortcuts

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