Registry / utility / lextoumbourou-goodhosts

lextoumbourou-goodhosts

JSON →
library2.1.0+incompatiblegogounverified

A Go library for managing the /etc/hosts file programmatically.

go get github.com/lextoumbourou/goodhosts
INSTALL
IMPORT
SIG · LEXTOUMBOUROU-GOOD
L
lextoumbourou-goodhosts
utilitygov2.1.0+incompatible
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

goodhosts
github.com/lextoumbourou/goodhosts

Adds a host entry to /etc/hosts and writes changes.

package main import ( "github.com/lextoumbourou/goodhosts" ) func main() { hosts := goodhosts.NewHosts() if err := hosts.Add("127.0.0.1", "example.com"); err != nil { panic(err) } if err := hosts.Flush(); err != nil { panic(err) } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.1.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
lextoumbourou-goodhosts — go get lextoumbourou-goodhosts · libregistry