Giter Site home page Giter Site logo

Required flags about crypt HOT 7 CLOSED

antoniaklja avatar antoniaklja commented on September 25, 2024 2
Required flags

from crypt.

Comments (7)

coilysiren avatar coilysiren commented on September 25, 2024 3

🎁 I come bearing gifts! 🎁 urfave/cli#819

from crypt.

pdolega avatar pdolega commented on September 25, 2024 1

Yeah, that would obviously work 👍
(and is often the only way - e.g. when you have conditionally required flags).

Normally I guess the added benefit (of having this possible in library) is that:

  • this check is implicit (obviously - that's the whole point)
  • it gets automatically marked appropriately in --help messages

from crypt.

pawelprazak avatar pawelprazak commented on September 25, 2024

I kind of get the explanation in the upstream issue, params validation is more of a "business logic".

I'd implement it as preconditions in the command, e.g.:
genuinetools/reg@58cebba#diff-f6da2430393ce391e4517013b6d3a95bL14

from crypt.

pawelprazak avatar pawelprazak commented on September 25, 2024

Hmm we might want to look at this:

urfave/cli#140
urfave/cli#140 (comment)
https://github.com/urfave/cli#placeholder-values
urfave/cli#85 (comment)
urfave/cli#85 (comment)
urfave/cli#85 (comment)

from crypt.

pawelprazak avatar pawelprazak commented on September 25, 2024

There's also a 4 yo PR ;)
urfave/cli#155

from crypt.

pawelprazak avatar pawelprazak commented on September 25, 2024

we might as well migrate to cobra library (used by kubectl)

from crypt.

antoniaklja avatar antoniaklja commented on September 25, 2024

fixed in v0.2.3

from crypt.

Related Issues (17)

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.