1
0
mirror of https://github.com/go-task/task.git synced 2025-01-26 05:27:15 +02:00

Simplify condition

This commit is contained in:
Andrey Nering 2017-04-30 18:50:44 -03:00
parent 9beef8b99b
commit 7e5cfefede

View File

@ -28,7 +28,7 @@ var (
var varCmds = make(map[string]string)
func handleDynamicVariableContent(value string) (string, error) {
if value == "" || value[0] != '$' {
if !strings.HasPrefix(value, "$") {
return value, nil
}
if result, ok := varCmds[value]; ok {