MCPcopy Create free account
hub / github.com/cel-expr/cel-go / StringsLocale

Function StringsLocale

ext/strings.go:345–350  ·  view source on GitHub ↗

StringsLocale configures the library with the given locale. The locale tag will be checked for validity at the time that EnvOptions are configured. If this option is not passed, string.format will behave as if en_US was passed as the locale. If StringsVersion is greater than or equal to 4, this opt

(locale string)

Source from the content-addressed store, hash-verified

343//
344// If StringsVersion is greater than or equal to 4, this option is ignored.
345func StringsLocale(locale string) StringsOption {
346 return func(sl *stringLib) *stringLib {
347 sl.locale = locale
348 return sl
349 }
350}
351
352// StringsVersion configures the version of the string library.
353//

Callers 2

TestStringFormatFunction · 0.85
TestBadLocaleFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestStringFormatFunction · 0.68
TestBadLocaleFunction · 0.68