ellipses

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: AGPL-3.0 Imports: 5 Imported by: 21 modules, 22 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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