Git Product home page Git Product logo

Comments (3)

willnorris avatar willnorris commented on May 5, 2024

pulling logic out of main() would certainly make things easier to test as well, so I'm supportive in theory.

That said, I'd want to be very deliberate about what API surface we're exposing. I've been somewhat fast and loose with some of the refactors I've done in the past because it was all internal anyway. That wouldn't be the case here. One way to guard against that is to keep the exported API as bare minimum as possible. Is it really necessary to export all of those methods? I'm not sure.

/cc @mco-gh directly for opinions

from addlicense.

mco-gh avatar mco-gh commented on May 5, 2024

I'm not opposed to this proposal but don't have much in the way of cycles these days for this project so I may not have time to review any large PRs but if you're ok with it Will, then I'm fine too.

from addlicense.

CalebAlbers avatar CalebAlbers commented on May 5, 2024

That said, I'd want to be very deliberate about what API surface we're exposing.

I'm 100% on board with that. To better inform the discussion, I pushed some potential changes into draft PR #124. I took your advice and stuck to exporting the bare minimum, which at this point is just a Run function. I purposely did some things like leaving the deprecated skipExtensionFlags option in main, passing only a ignorePatterns argument instead.

I also explored some options like passing a *log.Logger interface around instead of calling log functions directly. There's still work to be done as far as figuring out how to handle the fact that checkonly calls OS.exit(1), etc.

It's rough around the edges, but I'd love to use it as a stepping stone for further discussion. Thank you both for being so open to considering a refactor!

from addlicense.

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.