mirror of
https://github.com/cbednarski/hostess
synced 2024-11-11 19:10:37 +00:00
Added some commands in the readme
This commit is contained in:
parent
b52b8571fd
commit
15fe9d2f9b
@ -11,6 +11,10 @@ An idempotent command-line utility for managing your `/etc/hosts` file.
|
||||
hostess off domain # Disable a domain (but don't remove it completely)
|
||||
hostess on domain # Re-enable a domain that was disabled
|
||||
hostess ls # List domains, target ips, and on/off status
|
||||
hostess fix # Read your hosts file and spew warnings if needed
|
||||
hostess fix -f # Rewrite your hosts file (things may get deleted)
|
||||
hostess dump # Dump your hosts file as json
|
||||
hostess apply # Add entries from a json file
|
||||
|
||||
hostess may mangle your hosts file. In general it will probably look like this, with domains pointing at the same IP grouped together and disabled domains commented out.
|
||||
|
||||
|
@ -18,5 +18,5 @@ func main() {
|
||||
hostfile := hostess.NewHostfile(hostess.GetHostsPath())
|
||||
hostfile.Load()
|
||||
hostfile.Parse()
|
||||
fmt.Println(hostfile)
|
||||
fmt.Println(hostfile.Format())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user