Documentation ¶
Index ¶
- func ConvertRTypes(rtypeStrs []string) ([]uint16, error)
- func ParseNameservers(passedNameservers []string, nameserverMap map[string]string) ([]string, map[string]string, error)
- func ParseSubnets(passedSubnets []string, subnetMap map[string]net.IP) ([]net.IP, map[string]string, error)
- func Run(cmdCtx command.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertRTypes ¶ added in v0.0.8
func ParseNameservers ¶ added in v0.0.11
func ParseSubnets ¶ added in v0.0.8
func ParseSubnets(passedSubnets []string, subnetMap map[string]net.IP) ([]net.IP, map[string]string, error)
ParseSubnets turns a list of passed subnets into a list of net.IP for digging, a map of stringified subnet to name, and an error. It uses the following rules:
If passedSubnets is empty, returns []net.IP{nil}. Return this instead of nil directly because we'll want to range over the returned list
If passedSubnets == {"all"} and we have a non-empty subnetMap, return everything in subnetMap.
Loop through passedSubnets
first check if subnet == "none"
then try to lookup up the passed subnet in subnetMap,
then try to parse as an IP.
Fail if we can't find it in the map or parse it as an IP.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.