helpers

package
v9.0.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDirectory

func CopyDirectory(src, dst string) error

CopyDirectory copies all files in the given src directory into the given dst directory. Both the source and the destination directory must exist.

func FolderName

func FolderName(scenarioName string) string

FolderName converts the given scenario name into a string that can be used safely as a folder name on the filesystem.

func HasTag

func HasTag(scenario *messages.Pickle, name string) bool

hasTag indicates whether the given feature has a tag with the given name.

func LongestStringLength

func LongestStringLength(strings []string) int

LongestStringLength provides the length of the longest string in the given string collection.

func TableFields

func TableFields(table *messages.PickleStepArgument_PickleTable) []string

TableFields provides the header fields of the given table.

func TableToInput

func TableToInput(table *messages.PickleStepArgument_PickleTable) []string

Types

type Counter

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

Counter provides unique string segments. The zero value is an initialized instance.

func (*Counter) ToString

func (c *Counter) ToString() string

ToString provides a globally unique text each time it is called.

type OrderedStringSet

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

OrderedStringSet is a Set for strings that provides the accumulated strings in the order they were received. The zero value is a fully functional empty set.

func NewOrderedStringSet

func NewOrderedStringSet(elements ...string) OrderedStringSet

NewOrderedStringSet provides instances of OrderedStringSet populated with the given elements.

func (OrderedStringSet) Add

Add provides a new Set with the given element added. If the element already exists, it re-uses the existing element and does not append a new one.

func (OrderedStringSet) Contains

func (set OrderedStringSet) Contains(text string) bool

Contains indicates whether this Set contains the given string.

func (OrderedStringSet) Slice

func (set OrderedStringSet) Slice() []string

Slice provides the elements of this set in the order they were received.

func (OrderedStringSet) String

func (set OrderedStringSet) String() string

Jump to

Keyboard shortcuts

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