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

Function StringsLocale

ext/strings.go:348–353  ·  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

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

Callers 2

TestStringFormatFunction · 0.85
TestBadLocaleFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestStringFormatFunction · 0.68
TestBadLocaleFunction · 0.68