GithubHelp home page GithubHelp logo

Disable placeholder about go-arg HOT 4 CLOSED

p3lim avatar p3lim commented on August 28, 2024
Disable placeholder

from go-arg.

Comments (4)

alexflint avatar alexflint commented on August 28, 2024

Seems reasonable but out of interest why would you put a struct tag with an empty string for the placeholder in the first place?

from go-arg.

p3lim avatar p3lim commented on August 28, 2024

Better example why I want to hide the placeholders:

Before:

Usage: arg [--config CONFIG] [--output OUTPUT] [--key KEY] [--quiet]

Options:
  --config CONFIG, -c CONFIG
                         help me
  --output OUTPUT, -o OUTPUT
                         help me
  --key KEY, -k KEY      help me
  --quiet, -q            help me
  --help, -h             display this help and exit

After:

Usage: arg [--config ] [--output ] [--key ] [--quiet]

Options:
  --config , -c          help me
  --output , -o          help me
  --key , -k             help me
  --quiet, -q            help me
  --help, -h             display this help and exit

The placeholder just destroys the readability of the help section (in my opinion at least), and this was only a small example.

from go-arg.

p3lim avatar p3lim commented on August 28, 2024

I could live with them if the options ended up like this though:

Usage: arg [--config CONFIG] [--output OUTPUT] [--key KEY] [--quiet]

Options:
  --config, -c CONFIG   help me
  --output, -o OUTPUT   help me
  --key, -k KEY         help me
  --quiet, -q           help me
  --help, -h            display this help and exit

This seems to be the norm with long and short option variants, which go-arg doesn't follow.

from go-arg.

alexflint avatar alexflint commented on August 28, 2024

Ah very good point!

from go-arg.

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.