flag

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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