utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CIDRinCIDR

func CIDRinCIDR(cidr1 string, cidr2 string) (bool, error)

func CIDRtoIPs

func CIDRtoIPs(cidr string) ([]netip.Addr, error)

func Contains

func Contains(s []string, str string) bool

func DataDir

func DataDir() (string, error)

DataDir returns the path to ~/.massmap/ and ensures the directory exists. All persistent massmap data (cache, temp files) is stored here.

func IPinCIDR

func IPinCIDR(ip string, cidr string) bool

func IsCIDR

func IsCIDR(cidrStr string) bool

IsCIDR checks if the given string is a valid CIDR notation

func IsIP

func IsIP(ipStr string) bool

IsIP checks if the given string is a valid IP address

func IsIPv4

func IsIPv4(addr string) bool

func IsIPv6

func IsIPv6(addr string) bool

func JuicyPorts

func JuicyPorts() string

func ReadFile

func ReadFile(path string) ([]string, error)

func RemoveFile

func RemoveFile(path string) error

func RunCommand

func RunCommand(output bool, cmd ...string) (io.Reader, io.Reader, error)

func WriteTargetsToFile

func WriteTargetsToFile(targets *[]string) (string, error)

func YesNoPrompt

func YesNoPrompt(label string, def bool) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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