ellipses

package
v0.0.0-...-6b3dfbf Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidEllipsesFormatFn = func(arg string) error {
	return fmt.Errorf("Invalid ellipsis format in (%s), Ellipsis range must be provided in format {N...M} where N and M are positive integers, M must be greater than N,  with an allowed minimum range of 4", arg)
}

ErrInvalidEllipsesFormatFn error returned when invalid ellipses format is detected.

Functions

func HasEllipses

func HasEllipses(args ...string) bool

HasEllipses - returns true if input arg has ellipses type pattern.

Types

type ArgPattern

type ArgPattern []Pattern

ArgPattern contains a list of patterns provided in the input.

func FindEllipsesPatterns

func FindEllipsesPatterns(arg string) (ArgPattern, error)

FindEllipsesPatterns - finds all ellipses patterns, recursively and parses the ranges numerically.

func (ArgPattern) Expand

func (a ArgPattern) Expand() [][]string

Expand - expands all the ellipses patterns in the given argument.

type Pattern

type Pattern struct {
	Prefix string
	Suffix string
	Seq    []string
}

Pattern - ellipses pattern, describes the range and also the associated prefix and suffixes.

func (Pattern) Expand

func (p Pattern) Expand() []string

Expand - expands a ellipses pattern.

Jump to

Keyboard shortcuts

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