mirror of
https://github.com/cbednarski/hostess
synced 2024-11-11 19:10:37 +00:00
Added options to help
This commit is contained in:
parent
288ea72582
commit
4e6ae63efd
12
cmd/main.go
12
cmd/main.go
@ -22,6 +22,8 @@ bash and make scripting. Add -h to any command to learn more about it.
|
||||
|
||||
WARNING: This program is BETA and not all commands are implemented.
|
||||
|
||||
Commands:
|
||||
|
||||
add Add (or update) a hosts entry
|
||||
del Delete a hosts entry
|
||||
has Exit 0 if entry exists, 1 if not
|
||||
@ -33,6 +35,14 @@ WARNING: This program is BETA and not all commands are implemented.
|
||||
dump Dump the hosts file as JSON
|
||||
apply Apply a JSON hosts dict to your hosts file
|
||||
|
||||
Options:
|
||||
|
||||
-f Force write to the hostfile even if there are errors or conflicts
|
||||
-n No-op. Show changes but don't write them.
|
||||
-q Supress errors
|
||||
-s Silent
|
||||
-h Show help for a command
|
||||
|
||||
Note: You can specify the HOSTESS_FILE environment variable to operate on a
|
||||
file other than /etc/hosts
|
||||
|
||||
@ -49,7 +59,7 @@ func main() {
|
||||
flags["force"] = flag.Bool("f", false, "Forcibly apply changes, even if there are errors or conflicts")
|
||||
flags["noop"] = flag.Bool("n", false, "No-op. Show changes but don't write them.")
|
||||
flags["quiet"] = flag.Bool("q", false, "Suppress error and conflict messages.")
|
||||
flags["silent"] = flag.Bool("qq", false, "Suppress all output. Check exit codes for success / failure.")
|
||||
flags["silent"] = flag.Bool("s", false, "Suppress all output. Check exit codes for success / failure.")
|
||||
flags["help"] = flag.Bool("h", false, "Help")
|
||||
|
||||
flag.Parse()
|
||||
|
Loading…
Reference in New Issue
Block a user