host

package
v0.0.0-...-2d78729 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDisabled

func IsDisabled(line string) bool

IsDisabled check if a line starts with a # comment marker.

func IsHostLine

func IsHostLine(line string) bool

IsHostLine checks if a line is a host line or a comment line.

func ListProfiles

func ListProfiles(src string, opts *ListOptions) error

ListProfiles shows a table with profile names status and routing information

func Read

func Read(r io.Reader, strict bool) (*hostFile, error)

Read returns hosts file content grouped by profiles. If you pass strict=true it would remove all comments.

Types

type ListOptions

type ListOptions struct {
	Profile string
}

ListOptions contains available options for listing.

Jump to

Keyboard shortcuts

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