xurl

package
v0.0.0-...-7149754 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address(address string) string

Address ensures that address contains localhost as host if non specified.

func HTTP

func HTTP(s string) (string, error)

HTTP ensures that a URL contains an HTTP scheme.

func HTTPEnsurePort

func HTTPEnsurePort(s string) string

HTTPEnsurePort ensures that url has a port number suits with the connection type.

func HTTPS

func HTTPS(s string) (string, error)

HTTPS ensures that a URL contains an HTTPS scheme.

func IsHTTP

func IsHTTP(address string) bool

func MightHTTPS

func MightHTTPS(s string) (string, error)

MightHTTPS ensures that a URL contains an HTTPS scheme when the current scheme is not HTTP. When the URL contains an HTTP scheme it is not modified.

func TCP

func TCP(s string) (string, error)

TCP ensures that a URL contains a TCP scheme.

func WS

func WS(s string) (string, error)

WS ensures that a URL contains a WS scheme.

Types

This section is empty.

Jump to

Keyboard shortcuts

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