parsiya / Hacking-with-Go

Golang for Security Professionals
GNU General Public License v3.0
1.81k stars 265 forks source link

Update 03.1.md #1

Closed blacknbunny closed 6 years ago

parsiya commented 6 years ago

Ah that mistake is intended. Also there's no need to get a string flag and parse it to bool. Go supports setting bool flags like this -log=true or -log=false. The existence of the -log will also count as true.

blacknbunny commented 6 years ago

but with this parse you can use "log" param without =

parsiya commented 6 years ago

Yes but for a bool flag you just include it. No need to mention it's true or not. Similar to the -v switch in many other tools.