package resolvconf

import "github.com/docker/docker/pkg/networkfs/resolvconf"

Index

Functions

func Build

func Build(path string, dns, dnsSearch []string) error

func Get

func Get() ([]byte, error)

func GetNameservers

func GetNameservers(resolvConf []byte) []string

GetNameservers returns nameservers (if any) listed in /etc/resolv.conf

func GetNameserversAsCIDR

func GetNameserversAsCIDR(resolvConf []byte) []string

GetNameserversAsCIDR returns nameservers (if any) listed in /etc/resolv.conf as CIDR blocks (e.g., "1.2.3.4/32") This function's output is intended for net.ParseCIDR

func GetSearchDomains

func GetSearchDomains(resolvConf []byte) []string

GetSearchDomains returns search domains (if any) listed in /etc/resolv.conf If more than one search line is encountered, only the contents of the last one is returned.

Source Files

resolvconf.go

Version
v1.3.2
Published
Nov 24, 2014
Platform
js/wasm
Imports
4 packages
Last checked
13 minutes ago

Tools for package owners.