clihelper

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiString

type MultiString []string

MultiString is a getopt Option to allows passing multiple of the same option and get an array of values Example : -o "a" -o "b" -o "c" -> [a, b, c]

func (*MultiString) Array

func (h *MultiString) Array() []string

Array returns the values as an array

func (*MultiString) ParseMultipleOptions

func (h *MultiString) ParseMultipleOptions() []string

ParseMultipleOptions returns the values parsed as an array

func (*MultiString) Set

func (h *MultiString) Set(str string, opt getopt.Option) error

Set is the method called when the parser encounters a matching switch

func (*MultiString) String

func (h *MultiString) String() string

String is an helper to get the string representation of the option

Jump to

Keyboard shortcuts

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