command

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSample

func NewSample(pather Pather, cmds ...func(Pather) *cobra.Command) *cobra.Command

NewSample creates a command with sampler sub commands.

func NewSampleConfig

func NewSampleConfig(cfg config.Sampler) func(Pather) *cobra.Command

NewSampleConfig creates factory that creates a command that displays a sample configuration file.

func NewVersion

func NewVersion(pather Pather) *cobra.Command

NewVersion creates a command that displays the SCION version information.

Types

type JoinedPather

type JoinedPather []Pather

JoinedPather joins together the paths of multiple Pather objects.

func Join

func Join(a, b Pather) JoinedPather

Join links two pathers.

func (JoinedPather) CommandPath

func (l JoinedPather) CommandPath() string

CommandPath concatenates all the pather in the list.

type Pather

type Pather interface {
	CommandPath() string
}

Pather returns the path to a command.

type StringPather

type StringPather string

StringPather implements Pather for the string type.

func (StringPather) CommandPath

func (s StringPather) CommandPath() string

Jump to

Keyboard shortcuts

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