url

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatHosts

func FormatHosts(hosts []string, ports []int, scheme string, verbose bool) [][]string

FormatHosts() takes a list of hosts and ports and builds full URLs in the form of scheme://host:port. If no scheme is provided, it will use "https" by default.

Returns a 2D string slice where each slice contains URL host strings for each port. The intention is to have all of the URLs for a single host combined into a single slice to initiate one goroutine per host, but making request to multiple ports.

func FormatIPs

func FormatIPs(ips []string, ports []int, scheme string, verbose bool) [][]string

FormatIPs() takes a list of IP addresses and ports and builds full URLs in the form of scheme://host:port. If no scheme is provided, it will use "https" by default.

Returns a 2D string slice where each slice contains URL host strings for each port. The intention is to have all of the URLs for a single host combined into a single slice to initiate one goroutine per host, but making request to multiple ports.

func Sanitize

func Sanitize(uri string) (string, error)

func TrimScheme added in v0.3.0

func TrimScheme(uri string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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