netx

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package netx contains network related utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostPort

type HostPort struct {
	Host string
	Port int
}

A HostPort is a host/port pair

func MustParseHostPort

func MustParseHostPort(hostport string) HostPort

MustParseHostPort parses the given host:port string, panicking if the string cannot be parsed.

func ParseHostPort

func ParseHostPort(hostport string) (HostPort, error)

ParseHostPort parses the given host:port string into a host port structure.

func (HostPort) String

func (hp HostPort) String() string

String converts the given host port into a string.

func (*HostPort) UnmarshalText

func (hp *HostPort) UnmarshalText(data []byte) error

UnmarshalText unmarshals the host port from a text encoding.

Jump to

Keyboard shortcuts

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