args

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package args handles parsing command line arguments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(ctx context.Context) context.Context

Parse reads any command line arguments given and acts on them.

func Usage

func Usage()

Usage displays the usage information.

Types

type ContextCfg

type ContextCfg string

ContextCfg is the key used when getting/setting the Options struct from the context object.

type Options

type Options struct {
	// Log defines the logging level that should be used.
	Log string
	// Version displays the version information and exits.
	Version bool
}

Options contains all supported cmd line arguments.

func GetOptions

func GetOptions(ctx context.Context) Options

GetOptions fetches the stored configuration settings from the context.

Jump to

Keyboard shortcuts

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