options

package
v0.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package options declares options to be used in customizeable matchers Note: Options of ALL `be_*` matchers are stored here, in a separate package `options`.

 It's done with consideration that `options` package will be imported via `dot import`
 so inside your tests options are clear & short, without package name
e.g.: `Expect(myString).To(be_string.Only( Alpha | Numeric | Whitespace )`

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option int

Option represents an option for any customizable matcher

type StringOption

type StringOption Option
const (

	// Alpha option represents the presence of alphabetical characters.
	Alpha StringOption = 1 << (iota - 1)

	// Numeric option represents the presence of numeric characters.
	Numeric

	// Whitespace option represents the presence of whitespace characters.
	Whitespace

	// Dots option represents the presence of dot characters.
	Dots

	// Punctuation option represents the presence of punctuation characters.
	Punctuation

	// SpecialCharacters option represents the presence of special characters.
	SpecialCharacters
)

func ExtractStringOptions

func ExtractStringOptions(combined StringOption) []StringOption

ExtractStringOptions extracts individual options from a combined string option

func (StringOption) String

func (f StringOption) String() string

Jump to

Keyboard shortcuts

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