From f752479cb87abb22258b51c4b1c83ee249e60a38 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin <valyala@gmail.com> Date: Thu, 17 Oct 2019 00:45:31 +0300 Subject: [PATCH] app/victoria-metrics/test: add missing docs to public funcs PopulateTimeTplString and PopulateTimeTpl --- app/victoria-metrics/test/parser.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/victoria-metrics/test/parser.go b/app/victoria-metrics/test/parser.go index 953fb6af02..256ecd30f2 100644 --- a/app/victoria-metrics/test/parser.go +++ b/app/victoria-metrics/test/parser.go @@ -13,10 +13,12 @@ var ( extractRegex = regexp.MustCompile(`"?{([^}]*)}"?`) ) +// PopulateTimeTplString substitutes {TIME_*} with t in s and returns the result. func PopulateTimeTplString(s string, t time.Time) string { return string(PopulateTimeTpl([]byte(s), t)) } +// PopulateTimeTpl substitutes {TIME_*} with tGlobal in b and returns the result. func PopulateTimeTpl(b []byte, tGlobal time.Time) []byte { return parseTimeExpRegex.ReplaceAllFunc(b, func(repl []byte) []byte { t := tGlobal