package lazyregexp
import "golang.org/x/tools/internal/mod/lazyregexp"
Package lazyregexp is a thin wrapper over regexp, allowing the use of global regexp variables without forcing them to be compiled at init.
Index ¶
Types ¶
type Regexp ¶
type Regexp struct {
// contains filtered or unexported fields
}
Regexp is a wrapper around regexp.Regexp, where the underlying regexp will be compiled the first time it is needed.
func New ¶
New creates a new lazy regexp, delaying the compiling work until it is first needed. If the code is being run as part of tests, the regexp compiling will happen immediately.
func (*Regexp) MatchString ¶
Source Files ¶
lazyre.go
- Version
- v0.1.8
- Published
- Dec 2, 2021
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 3 hours ago –
Tools for package owners.