Skip to content

Go package for retrieving DNS resolver IP addresses used by the macOS system

License

Notifications You must be signed in to change notification settings

romantomjak/resolv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

resolv

The missing function from net package


This package provides local DNS resolver IP addresses used by the macOS system.

Installation

Use the go command:

go get -u github.com/romantomjak/resolv

Example

package main

import (
	"fmt"

	"github.com/romantomjak/resolv"
)

func main() {
	addrs, err := resolv.ServerAddrs()
	if err != nil {
		panic(err)
	}

	for k, v := range addrs {
		fmt.Printf("DNS Resolver #%d: %s\n", k, v)
	}
}

License

MIT

About

Go package for retrieving DNS resolver IP addresses used by the macOS system

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages