From 15fe9d2f9bbab100721c9947d3ef1fe75ad38bfc Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Wed, 4 Feb 2015 10:10:05 -0800 Subject: [PATCH] Added some commands in the readme --- README.md | 4 ++++ cmd/main.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2491dd3..25e1593 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/cmd/main.go b/cmd/main.go index 8085281..0832d5c 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -18,5 +18,5 @@ func main() { hostfile := hostess.NewHostfile(hostess.GetHostsPath()) hostfile.Load() hostfile.Parse() - fmt.Println(hostfile) + fmt.Println(hostfile.Format()) }