Do not output errors in the middle of the config

This commit is contained in:
Steven Polley 2020-05-29 20:25:45 -06:00
parent 47c64f6106
commit 784ff2fcc9
1 changed files with 1 additions and 3 deletions

View File

@ -2,7 +2,6 @@ package main
import (
"fmt"
"log"
"net/url"
)
@ -22,8 +21,7 @@ func config(redirects []Redirect) error {
for _, redirect := range redirects {
sourceURL, err := url.Parse(redirect.sourceURL)
if err != nil {
log.Printf("skipping redirect: unable to parse source URL '%s': %v", redirect.sourceURL, err)
continue
return fmt.Errorf("unable to parse source URL '%s': %v", redirect.sourceURL, err)
}
fmt.Printf("edit \"%s\"\n", redirect.sourceURL)