flags

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Now = iso8601.Now

Functions

func CloseAll added in v0.0.14

func CloseAll(fs *pflag.FlagSet) error

Types

type Base64FileValue added in v0.0.11

type Base64FileValue struct {
	// contains filtered or unexported fields
}

Base64FileValue adapts File.File for use as a flag.

func NewBase64FileValue added in v0.0.11

func NewBase64FileValue() *Base64FileValue

func (*Base64FileValue) Set added in v0.0.11

func (v *Base64FileValue) Set(s string) error

Set sets the value based on a file content.

func (*Base64FileValue) String added in v0.0.11

func (v *Base64FileValue) String() string

func (*Base64FileValue) Type added in v0.0.11

func (v *Base64FileValue) Type() string

Type name for File.File flags.

func (*Base64FileValue) Value added in v0.0.11

func (v *Base64FileValue) Value() (string, bool)

type Closer added in v0.0.14

type Closer interface {
	Close() error
}

type FileValue added in v0.0.11

type FileValue struct {
	// contains filtered or unexported fields
}

FileValue sets a flag with a file content.

func NewFileValue added in v0.0.11

func NewFileValue() *FileValue

func (*FileValue) Set added in v0.0.11

func (v *FileValue) Set(s string) error

Set sets the value based on a file content.

func (*FileValue) String added in v0.0.11

func (v *FileValue) String() string

func (*FileValue) Type added in v0.0.11

func (v *FileValue) Type() string

Type name for File.File flags.

func (*FileValue) Value added in v0.0.11

func (v *FileValue) Value() (string, bool)

type ReaderValue added in v0.0.14

type ReaderValue struct {
	// contains filtered or unexported fields
}

ReaderValue sets an io.Reader value from a flag.

func NewReaderValue added in v0.0.14

func NewReaderValue() *ReaderValue

func (*ReaderValue) Close added in v0.0.14

func (v *ReaderValue) Close() error

func (*ReaderValue) Set added in v0.0.14

func (v *ReaderValue) Set(s string) error

Set sets the value based on a file content.

func (*ReaderValue) String added in v0.0.14

func (v *ReaderValue) String() string

func (*ReaderValue) Type added in v0.0.14

func (v *ReaderValue) Type() string

Type name for File.File flags.

func (*ReaderValue) Value added in v0.0.14

func (v *ReaderValue) Value() (io.Reader, bool)

type TimeValue

type TimeValue struct {
	// contains filtered or unexported fields
}

TimeValue adapts time.Time for use as a flag.

func NewTimeValue

func NewTimeValue() *TimeValue

func (*TimeValue) Set

func (d *TimeValue) Set(s string) error

Set time.Time value from string (rfc3339, iso8601 or duration).

func (*TimeValue) String

func (d *TimeValue) String() string

func (*TimeValue) Type

func (d *TimeValue) Type() string

Type name for time.Time flags.

func (*TimeValue) Value

func (d *TimeValue) Value() (iso8601.Time, bool)

Jump to

Keyboard shortcuts

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