goodhosts / cli

Simple hosts file management in a Go cli
MIT License
29 stars 8 forks source link

Additional Clean flags to target your cleanup #31

Closed luthermonson closed 2 years ago

luthermonson commented 2 years ago

cleaning everything was a bit too much of a hammer for some people so we've switched to having a bool flag for each clean and an --all or -A to do the original clean with no args we had previously. due to behavior changing from no args doing the full clean to -A doing the full clean we will ++ the minor release when this is merged

vendor includes v0.0.10 bump of hostsfile which includes the windows fixes for 9 hosts/line.

~\goodhosts\cli [clean-flags] > gc hosts
127.0.0.2 b1 a2
127.0.0.1 host host
~\goodhosts\cli [clean-flags] > goodhosts -f ./hosts clean --dry-run --si
127.0.0.1 host host
127.0.0.2 b1 a2
~\goodhosts\cli [clean-flags] > goodhosts -f ./hosts clean --dry-run --sh
127.0.0.2 a2 b1
127.0.0.1 host host
~\goodhosts\cli [clean-flags] > goodhosts -f ./hosts clean --dry-run --rdh
127.0.0.2 b1 a2
127.0.0.1 host
~\goodhosts\cli [clean-flags] > goodhosts -f ./hosts clean --dry-run --rdi
127.0.0.2 b1 a2
127.0.0.1 host host
~\goodhosts\cli [clean-flags] > goodhosts -f ./hosts clean --dry-run --all
127.0.0.1 host
127.0.0.2 a2 b1