From 164404879d8498d4e3d4e2a94a7eb3f1a39b8594 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 25 Jun 2020 15:59:54 +0200 Subject: [PATCH] Add string replace template function for file format --- cmd/tk/export.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/tk/export.go b/cmd/tk/export.go index e3c59afbb..cf5b0c384 100644 --- a/cmd/tk/export.go +++ b/cmd/tk/export.go @@ -37,6 +37,9 @@ func exportCmd() *cli.Command { "lower": func(s string) string { return strings.ToLower(s) }, + "replace": func(old, new string, s string) string { + return strings.Replace(s, old, new, -1) + }, } cmd.Run = func(cmd *cli.Command, args []string) error {