URL problems were coming from the cobra generator

This commit is contained in:
Finn 2021-02-02 15:41:10 -08:00
parent 71ce7b56f5
commit 13143c756c

View file

@ -57,11 +57,11 @@ func filePrepender(filename string) string {
now := time.Now().Format(time.RFC3339) now := time.Now().Format(time.RFC3339)
name := filepath.Base(filename) name := filepath.Base(filename)
base := strings.TrimSuffix(name, path.Ext(name)) base := strings.TrimSuffix(name, path.Ext(name))
url := "/signaldctl/" + strings.ToLower(base) url := strings.ToLower(base)
return fmt.Sprintf(fmTemplate, now, strings.Replace(base, "_", " ", -1), base, url) return fmt.Sprintf(fmTemplate, now, strings.Replace(base, "_", " ", -1), base, url)
} }
func linkHandler(name string) string { func linkHandler(name string) string {
base := strings.TrimSuffix(name, path.Ext(name)) base := strings.TrimSuffix(name, path.Ext(name))
return "/signaldctl/" + strings.ToLower(base) return "/signald-go/" + strings.ToLower(base)
} }