(taskPath string)
| 607 | } |
| 608 | |
| 609 | func templateNameFromTaskPath(taskPath string) string { |
| 610 | base := filepath.Base(taskPath) |
| 611 | ext := filepath.Ext(base) |
| 612 | if ext != "" { |
| 613 | base = strings.TrimSuffix(base, ext) |
| 614 | } |
| 615 | if base == "" || base == "." { |
| 616 | return "default" |
| 617 | } |
| 618 | return base |
| 619 | } |