options

package
v0.0.0-...-0bc8776 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorNotEnoughArguments indicates than user passed too few arguments
	ErrorNotEnoughArguments = errors.New(`Not enough arguments`)

	// ErrorTooManyArguments indicates than user passed too many arguments
	ErrorTooManyArguments = errors.New(`Too many arguments`)
)

Functions

This section is empty.

Types

type Options

type Options struct {
	Verbose, DryRun bool
	SecretEnv       string
	Encrypt         bool
	In, Out         string

	Name string
}

Options for application

func (*Options) Parse

func (options *Options) Parse(arguments []string) error

Parse parses options, emits error if any

func (*Options) ParseOrExit

func (options *Options) ParseOrExit(arguments []string)

ParseOrExit parses options, if any error calls os.Exit(2)

Jump to

Keyboard shortcuts

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