Validate URL in Golang

package main

import (
    "fmt"
    "net/url"
)

func isValidUrl(str string) bool {
    _, err := url.ParseRequestURI(str)
    if err != nil {
        return false
    }
    return true
}

func main() {

    str := "https://nilpointer.net"
    if isValidUrl(str) {
        fmt.Println("Valid")
    } else {
        fmt.Println("InValid")
    }

}    
Valid