hosts

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct {
	// contains filtered or unexported fields
}

Holds information about hosts mapping config file location

var (
	// Default OS-level hosts mapping configuration file
	EtcHosts *Source = NewSource("", nil)
)

func NewSource

func NewSource(hostsFilePath string, fs afero.Fs) *Source

func (*Source) Apply

func (src *Source) Apply(handler func(path string, fs afero.Fs) error) error

func (*Source) Load

func (src *Source) Load() (*dom.Document, error)

func (*Source) Path

func (src *Source) Path() string

func (*Source) Save

func (src *Source) Save(doc *dom.Document, fm dom.FmtMode) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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