digcombine

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertRTypes added in v0.0.8

func ConvertRTypes(rtypeStrs []string) ([]uint16, error)

func ParseNameservers added in v0.0.11

func ParseNameservers(passedNameservers []string, nameserverMap map[string]string) ([]string, map[string]string, error)

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.

func Run

func Run(cmdCtx command.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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