testflags

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const TimeLayout = "2006-01-02"

Variables

This section is empty.

Functions

func Make

func Make(s *flagr.Set, prefix string) (Flags, Defaults)

func MustTime

func MustTime(t string) time.Time

func MustURL

func MustURL(t string) *url.URL

Types

type Defaults

type Defaults struct {
	Int             int
	Ints            []int
	Int8            int8
	Int8s           []int8
	Int16           int16
	Int16s          []int16
	Int32           int32
	Int32s          []int32
	Int64           int64
	Int64s          []int64
	Uint            uint
	Uints           []uint
	Uint8           uint8
	Uint8s          []uint8
	Uint16          uint16
	Uint16s         []uint16
	Uint32          uint32
	Uint32s         []uint32
	Uint64          uint64
	Uint64s         []uint64
	Float32         float32
	Float32s        []float32
	Float64         float64
	Float64s        []float64
	Complex64       complex64
	Complex64s      []complex64
	Complex128      complex128
	Complex128s     []complex128
	Bool            bool
	Bools           []bool
	String          string
	Strings         []string
	Duration        time.Duration
	Durations       []time.Duration
	Time            time.Time
	MustTime        string
	Times           []time.Time
	MustTimes       []string
	URL             *url.URL
	MustURL         string
	URLs            []*url.URL
	MustURLs        []string
	IPAddr          netip.Addr
	MustIPAddr      string
	IPAddrs         []netip.Addr
	MustIPAddrs     []string
	IPAddrPort      netip.AddrPort
	MustIPAddrPort  string
	IPAddrPorts     []netip.AddrPort
	MustIPAddrPorts []string
}

type Flags

type Flags struct {
	Int             *int
	Ints            *[]int
	Int8            *int8
	Int8s           *[]int8
	Int16           *int16
	Int16s          *[]int16
	Int32           *int32
	Int32s          *[]int32
	Int64           *int64
	Int64s          *[]int64
	Uint            *uint
	Uints           *[]uint
	Uint8           *uint8
	Uint8s          *[]uint8
	Uint16          *uint16
	Uint16s         *[]uint16
	Uint32          *uint32
	Uint32s         *[]uint32
	Uint64          *uint64
	Uint64s         *[]uint64
	Float32         *float32
	Float32s        *[]float32
	Float64         *float64
	Float64s        *[]float64
	Complex64       *complex64
	Complex64s      *[]complex64
	Complex128      *complex128
	Complex128s     *[]complex128
	Bool            *bool
	Bools           *[]bool
	String          *string
	Strings         *[]string
	Duration        *time.Duration
	Durations       *[]time.Duration
	Time            *time.Time
	MustTime        *time.Time
	Times           *[]time.Time
	MustTimes       *[]time.Time
	URL             **url.URL
	MustURL         **url.URL
	URLs            *[]*url.URL
	MustURLs        *[]*url.URL
	IPAddr          *netip.Addr
	MustIPAddr      *netip.Addr
	IPAddrs         *[]netip.Addr
	MustIPAddrs     *[]netip.Addr
	IPAddrPort      *netip.AddrPort
	MustIPAddrPort  *netip.AddrPort
	IPAddrPorts     *[]netip.AddrPort
	MustIPAddrPorts *[]netip.AddrPort
}

Jump to

Keyboard shortcuts

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