lazyre

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

lazyre lazily compiles a *regexp.Regexp in concurrency safe way Use &lazyre.RE{S: `...`} or call New

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RE

type RE struct {
	S string
	// contains filtered or unexported fields
}

func New

func New(s string) *RE

New creates a new *lazyRE

func (*RE) Must

func (lr *RE) Must() *regexp.Regexp

Must compiles regexp, returned *regexp.Regexp can be stored away and reused

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL