1
0
mirror of https://github.com/docker/cli.git synced 2025-04-18 19:24:03 +03:00

1 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
481e6f1477
implement lazyregexp package
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.

This is largely a copy of the package from golang.org/x/mod,
with FindAllStringSubmatch and ReplaceAllStringFunc added

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-10 12:22:24 +02:00