args

package module
v0.0.0-...-a7cf988 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

README

args

A command line args parser in TDD style

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooManyArgs = errors.New("too many argruments")
)

Functions

func Parse

func Parse(args ...string) (interface{}, error)

Parse parses command line flags into options

Types

type BooleanOption

type BooleanOption bool

func (BooleanOption) Logging

func (b BooleanOption) Logging() bool

type IntOption

type IntOption int

func (IntOption) Port

func (i IntOption) Port() int

type MultiOptions

type MultiOptions struct {
	BooleanOption
	IntOption
	StringOption
}

type StringOption

type StringOption string

func (StringOption) Directory

func (s StringOption) Directory() string

Jump to

Keyboard shortcuts

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