- changed variables that was uppercased, that's not OK for linters - cleanup some documentation - remove the "/" in label prefix, a function is now used to get the complete label (`labelName()`) - some cleanup in tpl files, and so on...
17 lines
439 B
Go
17 lines
439 B
Go
package generator
|
|
|
|
import "regexp"
|
|
|
|
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{
|
|
labelName("version"): Version,
|
|
}
|
|
)
|