url

package
v0.0.0-...-31c1c1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasScheme

func HasScheme(address string) bool

HasScheme returns whether the address has an URL scheme prefix

func Lookup

func Lookup(address string) (string, error)

Lookup returns the first resolved IP address of the host in the address. If the address doesn't have an URL scheme prefix, an empty string and no error is returned. If the address is an URL and the lookup fails, an error is returned.

func Parse

func Parse(address string) (*url.URL, error)

Parse parses an URL into its components. Returns a net/url.URL or an error if the URL couldn't be parsed.

func Validate

func Validate(address string) error

Validate checks whether the given address is a valid URL

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL