helpers

package
v14.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasTag

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

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

func TableFields

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

TableFields provides the header fields of the given table.

func TableToInputEnv

func TableToInputEnv(table *messages.PickleStepArgument_PickleTable) ([]string, error)

Types

type AtomicCounter

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

AtomicCounter provides unique string segments in a thread-safe way. The zero value is an initialized instance.

func (*AtomicCounter) ToString

func (self *AtomicCounter) ToString() string

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

type OrderedSet

type OrderedSet[T comparable] struct {
	// contains filtered or unexported fields
}

OrderedSet is a Set that provides its elements in the order they were received.

func NewOrderedSet

func NewOrderedSet[T comparable](elements ...T) OrderedSet[T]

NewOrderedSet provides instances of OrderedSet populated with the given elements.

func (OrderedSet[T]) Add

func (os OrderedSet[T]) Add(element T) OrderedSet[T]

Add provides a new OrderedSet with the given element added. The element is only added if it doesn't exist in the original set.

func (OrderedSet[T]) Contains

func (os OrderedSet[T]) Contains(element T) bool

Contains indicates whether this Set contains the given element.

func (OrderedSet[T]) Elements

func (os OrderedSet[T]) Elements() []T

Elements provides the elements of this os in the order they were received.

func (OrderedSet[T]) Join

func (os OrderedSet[T]) Join(sep string) string

Jump to

Keyboard shortcuts

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