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

lanip

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package lanip finds the host's LAN IPv4 address. It is a leaf package (stdlib only) so dns, podman, tui and ui can share it without a cycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Primary

func Primary() string

Primary returns the local IPv4 address the kernel would use to reach a public destination, falling back to the first up, non-loopback interface address. Empty when neither yields one. The dial sends no packets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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