flags

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 1 module, 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

This section is empty.

Types

type Common

type Common interface {
	ConfigDirectory() string
	ConfigFileName() string
	Parse([]string)
	Help()
}

Common is an interface that defines AP for the common command-line flags used by most Edge services

type Default

type Default struct {
	FlagSet *flag.FlagSet
	// contains filtered or unexported fields
}

Default is the Default implementation of Common used by most Edge services

func New

func New() *Default

New returns a Default struct with an empty additional usage string.

func NewWithUsage

func NewWithUsage(additionalUsage string) *Default

NewWithUsage returns a Default struct.

func (*Default) ConfigDirectory

func (d *Default) ConfigDirectory() string

ConfigDirectory returns the directory where the config file(s) are located, if it was specified.

func (*Default) ConfigFileName

func (d *Default) ConfigFileName() string

ConfigFileName returns the name of the local configuration file

func (*Default) Help

func (d *Default) Help()

Help displays the usage help message and exit.

func (*Default) Parse

func (d *Default) Parse(arguments []string)

Parse parses the passed in command-lie arguments looking to the default set of common flags

Jump to

Keyboard shortcuts

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