Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // WordRunes defines the characters that can be used in words (as defined by regex). WordRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") // NonWordRunes defines the characters that can't be used in words (as defined by regex). NonWordRunes = []rune(" ,.-;:_!\"§$%&\\/()=?`´#'+*}][{\n") // Alphabet defines the characters used for arbitrary characters, must end with a newline. Alphabet = append(WordRunes, NonWordRunes...) )
Functions ¶
Types ¶
type Synthexp ¶
type Synthexp struct {
// contains filtered or unexported fields
}
Synthexp offers functionality to generate strings from a regex.
func (*Synthexp) Synth ¶
Synth synthesises a random []rune that is matched by expr. The parameters in caps allow you to provide fixed values for captures within the regexp. They are not checked against the expression which can lead to non-matching strings. You can provide nil for captures that should be filled by synthexp.
func (*Synthexp) SynthBytes ¶
SynthBytes synthesizes a random string that is matched by expr. The parameters in caps allow you to provide fixed values for captures within the regexp. They are not checked against the expression which can lead to non-matching strings. You can provide nil for captures that should be filled by synthexp.
func (*Synthexp) SynthString ¶
SynthString synthesizes a random string that is matched by expr. The parameters in caps allow you to provide fixed values for captures within the regexp. They are not checked against the expression which can lead to non-matching strings. You can provide nil for captures that should be filled by synthexp.