diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-31 18:43:54 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-09-01 11:38:32 +1000 |
commit | ae0d88f855773dd76432487509f9af13f987a812 (patch) | |
tree | 849249573b2b809a0b9e406cd15ee000cc92ec76 /pkg/utils/utils.go | |
parent | cff1dee6dcb303e789b804bbe270a0032f0b76a7 (diff) |
WIP using runDirectCommand with xdg-open
Diffstat (limited to 'pkg/utils/utils.go')
-rw-r--r-- | pkg/utils/utils.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 62706559e..1d5f0f273 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -90,3 +90,11 @@ func Loader() string { index := nanos / 50000000 % int64(len(characters)) return characters[index : index+1] } + +// ResolvePlaceholderString populates a template with values +func ResolvePlaceholderString(str string, arguments map[string]string) string { + for key, value := range arguments { + str = strings.Replace(str, "{{"+key+"}}", value, -1) + } + return str +} |