dnstest

package
v0.24.48 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package dnstest is a test infrastructure package to be able to control DNS resolution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoopbackNames

func LoopbackNames(t *testing.T, first string, rest ...string)

LoopbackNames replaces net.DefaultResolver with a resolver that resolves configured names to 127.0.0.1 and fails to resolve any other name. Uses t.Cleanup to restore resolver after the test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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