Help us shape the future of Go! Take the 2026 Go Developer Survey

netutil

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT-0 Imports: 2 Imported by: 0

Documentation

Overview

Package netutil contains small network-address helpers shared by the listeners and the command line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Host

func Host(addr string) string

Host returns the host portion of an address. Addresses without a port are returned unchanged.

func IsLoopback

func IsLoopback(addr string) bool

IsLoopback reports whether addr is a loopback host, including the special name "localhost". An empty host (for example ":143") is not loopback.

Types

This section is empty.

Jump to

Keyboard shortcuts

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