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

Function matchLanguage

ext/formatting.go:250–257  ·  view source on GitHub ↗
(locale string)

Source from the content-addressed store, hash-verified

248}
249
250func matchLanguage(locale string) (language.Tag, error) {
251 matcher, err := makeMatcher(locale)
252 if err != nil {
253 return language.Und, err
254 }
255 tag, _ := language.MatchStrings(matcher, locale)
256 return tag, nil
257}
258
259func makeMatcher(locale string) (language.Matcher, error) {
260 tags := make([]language.Tag, 0)

Callers 2

FixedMethod · 0.85
ScientificMethod · 0.85

Calls 1

makeMatcherFunction · 0.85

Tested by

no test coverage detected