hosts

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: Apache-2.0, BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package hosts provides a simple way to parse hostnames and ports. Supported formats are:

Hosts parsed here are expected to be TLS hosts, and the port defaults to 443.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Target

type Target struct {
	Host string
	Port int
}

func ParseHost

func ParseHost(host string) (*Target, error)

func ParseHosts

func ParseHosts(hosts ...string) ([]*Target, error)

func (*Target) String

func (t *Target) String() string

Jump to

Keyboard shortcuts

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