package
1.7.9
Repository: https://github.com/eliaskioni/goflow.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

FindPhoneNumbers finds phone numbers anywhere in the given string.
Indent indents each non-empty line in the given string.
IsNil returns whether the given object is nil or an interface to a nil.
Max returns the maximum of two values.
Min returns the minimum of two values.
NewRedactor creates a new redaction function which replaces the given values.
ParsePhoneNumber tries to parse the given string as a phone number.
PrefixOverlap returns the number of prefix characters which s1 and s2 have in common.
ReadTypeFromJSON reads a field called `type` from the given JSON.
RegisterStructValidator registers a struct level validator.
RegisterValidatorAlias registers a tag alias.
RegisterValidatorTag registers a tag.
replaces any `\u0000` sequences with the given replacement sequence which may be empty.
Snakify turns the passed in string into a context reference.
StringSet converts a slice of strings to a set (a string > bool map).
StringSetKeys returns the keys of string set in lexical order.
StringSliceContains determines whether the given slice of strings contains the given string.
StringSlices returns the slices of s defined by pairs of indexes in indices.
TokenizeString returns the words in the passed in string, split by non word characters including emojis.
TokenizeStringByChars returns the words in the passed in string, split by the chars in the given string.
TokenizeStringByUnicodeSeg tokenizes the given string using the Unicode Text Segmentation standard described at http://www.unicode.org/reports/tr29/.
Truncate truncates the given string to ensure it's less than limit characters.
TruncateEllipsis truncates the given string and adds ellipsis where the input is cut.
UnmarshalAndValidate is a convenience function to unmarshal an object and validate it.
UnmarshalAndValidateWithLimit unmarshals a struct with a limit on how many bytes can be read from the given reader.
Validate will run validation on the given object and return a set of field specific errors in the format: field <fieldname> <tag specific message> For example: "field 'flows' is required" .

# Structs

TypedEnvelope can be mixed into envelopes that have a type field.

# Interfaces

RichError is a common interface for error types that can provide more detail.
Typed is an interface of objects that are marshalled as typed envelopes.

# Type aliases

Attachment is a media attachment on a message in the format <content-type>:<url>.
ErrorMessageFunc is the type for a function that can convert a field error to user friendly message.
Redactor is a function which can redact the given string.
ValidationErrors combines multiple validation errors as a single error.