GithubHelp home page GithubHelp logo

Comments (4)

dufferzafar avatar dufferzafar commented on July 16, 2024

Hmm, this sounds like the correct way to do it. 👍

from cli.

kytrinyx avatar kytrinyx commented on July 16, 2024

This is fairly standard in Unix, I think, but in Go it's very common to use a single dash for command line arguments, e.g. go test -run=MyTestName. @codegangsta Do you know if anyone has written up anything about idioms in the Go ecosystem for this sort of thing?

from cli.

codegangsta avatar codegangsta commented on July 16, 2024

I know that the flags package accepts both -- and - for each given flag. I assume this is for practical reasons. Whether someone types --help or -help, the basic assumption is that the user wants see the help.

Sent from my iPhone

On Jul 2, 2014, at 7:28 PM, Katrina Owen [email protected] wrote:

This is fairly standard in Unix, I think, but in Go it's very common to use a single dash for command line arguments, e.g. go test -run=MyTestName. @codegangsta Do you know if anyone has written up anything about idioms in the Go ecosystem for this sort of thing?


Reply to this email directly or view it on GitHub.

from cli.

jszwedko avatar jszwedko commented on July 16, 2024

We are at the mercy of the underlying flag parsing library on this one, but I agree that it could be something considered if we ever shifted away to our own parser.

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.