MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / MustCompile

Function MustCompile

internal/re/regexp.go:32–39  ·  view source on GitHub ↗
(exp string)

Source from the content-addressed store, hash-verified

30}
31
32func MustCompile(exp string) *Regexp {
33 var reg = &Regexp{
34 exp: exp,
35 rawRegexp: regexp.MustCompile(exp),
36 }
37 reg.init()
38 return reg
39}
40
41func Compile(exp string) (*Regexp, error) {
42 reg, err := regexp.Compile(exp)

Calls 1

initMethod · 0.45