{"id":75733,"library":"lextoumbourou-goodhosts","title":"GoodHosts","description":"A Go library for managing the /etc/hosts file programmatically.","status":"active","version":"2.1.0+incompatible","language":"go","source_language":null,"source_url":"https://github.com/lextoumbourou/goodhosts","tags":["hosts","etc-hosts","system","administration"],"install":[{"cmd":"go get github.com/lextoumbourou/goodhosts","lang":"bash","label":"Install github.com/lextoumbourou/goodhosts"}],"dependencies":[],"imports":[{"symbol":"goodhosts","correct":"github.com/lextoumbourou/goodhosts"}],"quickstart":{"code":"package main\n\nimport (\n\t\"github.com/lextoumbourou/goodhosts\"\n)\n\nfunc main() {\n\thosts := goodhosts.NewHosts()\n\tif err := hosts.Add(\"127.0.0.1\", \"example.com\"); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := hosts.Flush(); err != nil {\n\t\tpanic(err)\n\t}\n}","lang":"go","description":"Adds a host entry to /etc/hosts and writes changes."},"warnings":[],"env_vars":null,"search_vec":"'/etc/hosts':8 'administr':16 'etc':13 'etc-host':12 'file':9 'go':3 'goodhost':1 'host':11,14 'librari':4 'manag':6 'programmat':10 'system':15","created_at":"2026-06-17T19:20:27.570068+00:00","updated_at":"2026-06-17T19:20:27.570068+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/lextoumbourou/goodhosts","github":"https://github.com/lextoumbourou/goodhosts","docs":"https://pkg.go.dev/github.com/lextoumbourou/goodhosts#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}