Code Monkey home page Code Monkey logo

Comments (5)

scottruitt avatar scottruitt commented on July 21, 2024

Michael, I'll ask @tedsuo to help with this.

from cli.

caseymct avatar caseymct commented on July 21, 2024

Hi @fraenkel,
You can see the story in the CLI public backlog here.

@thansmann &@caseymct

from cli.

fraenkel avatar fraenkel commented on July 21, 2024

I have a pull request ready for codegangsta to see if he will add an IsSet method. scottruitt --- Re: [cli] No way to specify optional flags (#38) --- From:"scottruitt" [email protected]"cloudfoundry/cli" [email protected]"Michael Fraenkel" [email protected]:Wed, Dec 18, 2013 10:32 AMSubjectRe: [cli] No way to specify optional flags (#38)Michael, I'll ask @tedsuo to help with this.

β€”Reply to this email directly or view it on GitHub.

from cli.

tedsuo avatar tedsuo commented on July 21, 2024

@fraenkel so we just hit this issue as well. Our solution was to change the flag type from int to string, so that we can differentiate between not set (empty string) and "0".

see the commit for an example: 03e790b

Hope your pull request goes through with codegansta, it would be a good feature.

from cli.

fraenkel avatar fraenkel commented on July 21, 2024

Yea, that doesn't work for me since I have a Bool I can't use String since -enabled won't be handled properly. I was also hoping that I could play another trick and use String but have the parse treat it as a Bool with the magic IsBoolFlag, but they first type assert to boolValue which stops me dead in my tracks.

As an aside, there are a few other cases that need the Int -> String trick above, e.g., Buildpack position.

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.