Go to Katenary V3
This is the next-gen of Katenary
This commit is contained in:
19
generator/globals.go
Normal file
19
generator/globals.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package generator
|
||||
|
||||
import "regexp"
|
||||
|
||||
var (
|
||||
// regexp to all tpl strings
|
||||
tplValueRegexp = regexp.MustCompile(`\{\{.*\}\}-`)
|
||||
|
||||
// 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{
|
||||
KATENARY_PREFIX + "version": Version,
|
||||
}
|
||||
)
|
Reference in New Issue
Block a user