Do not output errors in the middle of the config
This commit is contained in:
parent
47c64f6106
commit
784ff2fcc9
@ -2,7 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -22,8 +21,7 @@ func config(redirects []Redirect) error {
|
|||||||
for _, redirect := range redirects {
|
for _, redirect := range redirects {
|
||||||
sourceURL, err := url.Parse(redirect.sourceURL)
|
sourceURL, err := url.Parse(redirect.sourceURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("skipping redirect: unable to parse source URL '%s': %v", redirect.sourceURL, err)
|
return fmt.Errorf("unable to parse source URL '%s': %v", redirect.sourceURL, err)
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("edit \"%s\"\n", redirect.sourceURL)
|
fmt.Printf("edit \"%s\"\n", redirect.sourceURL)
|
||||||
|
Loading…
Reference in New Issue
Block a user