lazy

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package lazy defers package-level setup to first use, so a command pays only for the patterns and tables of the code it runs (`driftgate version` compiles no regular expression).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Regexp

func Regexp(expr string) func() *regexp.Regexp

Regexp returns a function that compiles expr on its first call and returns the same *regexp.Regexp on every call. Like regexp.MustCompile, it panics if expr does not compile.

Types

This section is empty.

Jump to

Keyboard shortcuts

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