mirror of
https://github.com/go-task/task.git
synced 2025-11-23 22:24:45 +02:00
chore: run modernize
This commit is contained in:
@@ -244,8 +244,8 @@ func (t *Tasks) UnmarshalYAML(node *yaml.Node) error {
|
||||
}
|
||||
|
||||
func taskNameWithNamespace(taskName string, namespace string) string {
|
||||
if strings.HasPrefix(taskName, NamespaceSeparator) {
|
||||
return strings.TrimPrefix(taskName, NamespaceSeparator)
|
||||
if after, ok := strings.CutPrefix(taskName, NamespaceSeparator); ok {
|
||||
return after
|
||||
}
|
||||
return fmt.Sprintf("%s%s%s", namespace, NamespaceSeparator, taskName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user