cliparse

package
v0.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commandline

type Commandline struct {
	ProgramPath string
	Args        []string
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParse

func NewParse() *Parser

NewParse creates a new parser

func (*Parser) Parse

func (p *Parser) Parse(commandLine string, args ...string) (c *Commandline, err error)

Parse parses a command line or returns an error The command line may contain space seperated args. Additional can also be provided

func (*Parser) WithGlob

func (p *Parser) WithGlob(glob func(string) ([]string, error)) *Parser

adds a glob function too the parser, this expands any wildcard arguments

Jump to

Keyboard shortcuts

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