Coder Social home page Coder Social logo

Comments (5)

mitchellh avatar mitchellh commented on July 20, 2024

The reason we don't do this is because we use the interface across RPC in a couple of our projects and it didn't deal well with variadics... At this point it would actually break backwards compatibility too (as a lib).

We also follow the pattern of using fmt.Sprintf everywhere. Is it worth breaking compat over? I'm not sure.

from cli.

keyneston avatar keyneston commented on July 20, 2024

Possibly add Errorf, Outputf, Infof functions?

It would technically change the Ui interface if people have written their own implementations but otherwise would be a noop change for consumers of the library.

from cli.

keyneston avatar keyneston commented on July 20, 2024

There could also be a UiFormatter interface that implemented Ui and the formatter functions? That way even if people wrote their own implementations of the interface it would be a noop change?

I'm happy to do the work once you give sign off.

from cli.

mitchellh avatar mitchellh commented on July 20, 2024

That's a good idea. I like the idea of introducing a second interface. If you want to do a PR for that, that would be okay to me.

from cli.

mitchellh avatar mitchellh commented on July 20, 2024

Hey @tarrant, given how long its been I think we've made it long enough that this is okay. We don't want to break BC and the actual other reason we don't do variadics is for a weird reason that this works better with our plugin system.

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.