cmd

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HostsFileReadPath specify host file to read
	HostsFileReadPath string
	// HostsFileWritePath specify path to write resulting host file
	HostsFileWritePath string
	// Quiet results in no output
	Quiet bool
	// DryRun sends output to STDOUT (ignores quiet)
	DryRun bool
	// MaxHostsPerLine limits hostnames per line (0=auto, -1=unlimited, >0=explicit)
	MaxHostsPerLine int
)
View Source
var Version = "0.0.0"

Functions

func AddHosts

func AddHosts(ip string, hosts []string, comment string)

func Execute

func Execute()

Execute bootstraps the cobra root command

func ListByCIDRs

func ListByCIDRs(cidrs []string)

func ListByComment added in v1.7.0

func ListByComment(comment string)

func ListByHostnames

func ListByHostnames(hostnames []string)

func ListByIPs

func ListByIPs(ips []string)

func RemoveByComment added in v1.7.0

func RemoveByComment(comment string)

func RemoveHosts

func RemoveHosts(hosts []string)

func RemoveIPRanges

func RemoveIPRanges(cidrs []string)

func ShowHosts

func ShowHosts()

func VersionFromBuild

func VersionFromBuild() (version string)

VersionFromBuild Version returns the version of txeh binary

Types

This section is empty.

Jump to

Keyboard shortcuts

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