Code Monkey home page Code Monkey logo

Comments (3)

iximiuz avatar iximiuz commented on June 22, 2024

That's a great question!

I've been asking it myself since the inception of this project. As always, there are pros and cons. The biggest pro will be the reduced code duplication. However, the con is quite significant - to understand a single mini-program, one would need to learn the common package too. And this kind of against the main idea of this project - it was supposed to be a collection of pure independent mini-programs that rely only on the k8s and related packages without introducing extra abstractions and ready to be copy/pasted to someone else's code.

TL;DR I intentionally decided in favor of code duplication. However, I'm ready to reconsider, provided some good arguments.

from client-go-examples.

dylanhitt avatar dylanhitt commented on June 22, 2024

That is fair. When you put it that way I don't really have a great pro. I typically clone code when I look at it so navigating packages is fairly straightforward.

That being said it seems you've thought on this. I will close. Thanks for the response

from client-go-examples.

iximiuz avatar iximiuz commented on June 22, 2024

The thing is that this project is not a one big Go library but a collection of small(er) independent Go (mini-)programs. Extracting the common functionality would introduce a dependency for every mini-program on the common library. And that could complicate reading the code and especially reusing it in other projects. Instead of just copying the content of one file, you'd need to find a way to take the needed part of the common logic too.

from client-go-examples.

Related Issues (7)

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.