FAQ
In the documentation of package http://golang.org/pkg/flag/
I read:

    Command line flag syntax:
      -flag <---- this form can only be used for boolean flags ?
      -flag=x
      -flag x // non-boolean flags only

But when I use the first form "-flag", with no value, I get the message
"flag needs an argument", except for boolean flags.

So, the first form "-flag" can only be used for boolean flags ?


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedFeb 9, '15 at 9:30p
activeFeb 9, '15 at 9:44p
posts3
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase