Skip to content

Commit

Permalink
Add string replace template function for file format
Browse files Browse the repository at this point in the history
  • Loading branch information
simonfrey committed Jun 25, 2020
1 parent 44f9e6c commit 1644048
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/tk/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1644048

Please sign in to comment.