flag

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAutomationCmd

func GenerateAutomationCmd(cmdPath string, flags ...Generatable) string

GenerateAutomationCmd generates the command that can be used to achive the same results with the CLI in automation mode.

Types

type Flag

type Flag[T any] struct {
	Name   string
	Value  T
	Secure bool
}

func New

func New[T any](name string, secure bool) *Flag[T]

func (*Flag[T]) GetName

func (f *Flag[T]) GetName() string

func (*Flag[T]) GetValue

func (f *Flag[T]) GetValue() any

func (*Flag[T]) IsSecure

func (f *Flag[T]) IsSecure() bool

type Generatable

type Generatable interface {
	GetName() string
	GetValue() any
	IsSecure() bool
}

Jump to

Keyboard shortcuts

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