Files
katenary/internal/generator/globals.go

21 lines
516 B
Go
Raw Normal View History

package generator
import (
"regexp"
2025-08-19 23:09:50 +02:00
"repo.katenary.io/katenary/katenary/internal/generator/labels"
)
var (
// find all labels starting by __replace_ and ending with ":"
// and get the value between the quotes
// ?s => multiline
// (?P<inc>.+?) => named capture group to "inc" variable (so we could use $inc in the replace)
replaceLabelRegexp = regexp.MustCompile(`(?s)__replace_.+?: '(?P<inc>.+?)'`)
// Standard annotationss
Annotations = map[string]string{
labels.LabelName("version"): Version,
}
)