1
0
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:
Andrey Nering 2023-10-21 21:10:42 -03:00
parent 781e55fce9
commit 6de3be1384

View File

@ -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)
} }