mirror of
https://github.com/go-task/task.git
synced 2025-01-18 04:59:01 +02:00
refactor(merge): use constant
This commit is contained in:
parent
781e55fce9
commit
6de3be1384
@ -73,8 +73,8 @@ func Merge(t1, t2 *Taskfile, includedTaskfile *IncludedTaskfile, namespaces ...s
|
|||||||
}
|
}
|
||||||
|
|
||||||
func taskNameWithNamespace(taskName string, namespaces ...string) string {
|
func taskNameWithNamespace(taskName string, namespaces ...string) string {
|
||||||
if strings.HasPrefix(taskName, ":") {
|
if strings.HasPrefix(taskName, NamespaceSeparator) {
|
||||||
return strings.TrimPrefix(taskName, ":")
|
return strings.TrimPrefix(taskName, NamespaceSeparator)
|
||||||
}
|
}
|
||||||
return strings.Join(append(namespaces, taskName), NamespaceSeparator)
|
return strings.Join(append(namespaces, taskName), NamespaceSeparator)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user