@@ -161,8 +161,7 @@ func GetCacheDurationSecondsForPath(filePath string) int {
|
||||
}
|
||||
|
||||
func IsValidUrl(urlToTest string) bool {
|
||||
_, err := url.ParseRequestURI(urlToTest)
|
||||
if err != nil {
|
||||
if _, err := url.ParseRequestURI(urlToTest); err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -236,4 +235,4 @@ func CleanupDirectory(path string) {
|
||||
if err := os.MkdirAll(path, 0777); err != nil {
|
||||
log.Fatalln("Unable to create directory. Please check the ownership and permissions", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user