Skip to main content

contracts_regexp.go (package eai)

Source: sdks/go/contracts_regexp.go. Back to the Go SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Class ecmaPattern​

Compiled JSON Schema pattern: the leading lookaheads, evaluated apart, and the rest of the pattern in RE2.

ecmaPattern.MatchString​

MatchString(s string) bool

Reports whether s satisfies the leading lookaheads and the rest of the pattern.

NameTypeDefaultRequiredDescription
sstringyesValue of the contract field checked against the pattern.

Returns: bool. true when the value matches the pattern.

ecmaPattern.String​

String() string

Pattern as written in the contract.

This element takes no parameter.

Returns: string. Source of the pattern.