Registry / testing / foxcpp-go-mockdns

foxcpp-go-mockdns

JSON →
library1.2.0gogounverified

A mock DNS server for testing DNS resolution in Go applications.

go get github.com/foxcpp/go-mockdns
INSTALL
IMPORT
SIG · FOXCPP-GO-MOCKDNS
F
foxcpp-go-mockdns
testinggov1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mockdns
github.com/foxcpp/go-mockdns

Create a mock DNS server and query it.

package main import ( "fmt" "github.com/foxcpp/go-mockdns" ) func main() { srv, _ := mockdns.NewServer(map[string]mockdns.Zone{ "example.com.": {A: []string{"1.2.3.4"}}, }, false) defer srv.Close() fmt.Println(srv.LocalAddr()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
foxcpp-go-mockdns — go get foxcpp-go-mockdns · libregistry