xflag

package
v0.1.330 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package xflag add an additional flag type Array for repeated string flags.

var f xflag.Array
flag.Var(&f, "r", "some repeatable flag")

flag.Parse()                // $ command -r a -r b -r c
for _, v := range f { ... } // []string{"a", "b", "c"}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array []string

ArrayFlags allows to store lists of flag values.

func (*Array) Set

func (f *Array) Set(value string) error

Set appends a value.

func (*Array) String

func (f *Array) String() string

String representation.

Jump to

Keyboard shortcuts

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