Skip to main content

Module hosts

Module hosts 

Source
Expand description

/etc/hosts file management.

Ported from internal/backends/hosts/{interface,client}.go. Go’s implementation delegates to github.com/txn2/txeh; this port uses a small hand-rolled /etc/hosts parser (HostsFile) instead of pulling in an external crate for a narrow, well-understood file format. See PORT_NOTES.md.

Structs§

Client
Ported from Client in client.go.
HostsConfig
Ported from HostsConfig in interface.go.
ValidationResult
Ported from ValidationResult in interface.go.

Enums§

HostsError
Ported from the error txeh.NewHostsDefault() can return, wrapped as “reading hosts file: %w” in Go.
ValidationState
Ported from ValidationState in interface.go.

Traits§

Backend
Ported from the Backend interface in interface.go.