Skip to content

Commit bcb7ba7

Browse files
committed
remove redundant check
1 parent 31d506f commit bcb7ba7

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

urlutil/urlutil.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,6 @@ func GetMediaExtensions() []string {
224224

225225
// RemoveDefaultPort removes the default port from a URL based on its scheme.
226226
func RemoveDefaultPort(urlStr string) (string, error) {
227-
if !IsValidURL(urlStr) {
228-
return "", fmt.Errorf("invalid URL: %s", urlStr)
229-
}
230-
231227
u, err := url.Parse(urlStr)
232228
if err != nil {
233229
return "", fmt.Errorf("invalid URL: %w", err)

0 commit comments

Comments
 (0)