mirror of
https://github.com/containerd/containerd.git
synced 2026-06-24 08:48:48 +00:00
Based on the "lazyregexp" package in golang.org/x/mod; https://cs.opensource.google/go/x/mod/+/refs/tags/v0.19.0:internal/lazyregexp/lazyre.go;l=66-78 This package allows defining regular expressions that should not be compiled until used, but still providing validation to prevent invalid regular expressions from producing a panic at runtime. The lazyregexp package provides a subset of the methods provided by "regexp" and only implements the methods used in the codebase. Additional methods can be added when needed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>