mirror of
https://github.com/go-task/task.git
synced 2024-12-12 10:45:49 +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 {
|
||||
if strings.HasPrefix(taskName, ":") {
|
||||
return strings.TrimPrefix(taskName, ":")
|
||||
if strings.HasPrefix(taskName, NamespaceSeparator) {
|
||||
return strings.TrimPrefix(taskName, NamespaceSeparator)
|
||||
}
|
||||
return strings.Join(append(namespaces, taskName), NamespaceSeparator)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user