Code Monkey home page Code Monkey logo

Comments (4)

LandonTClipp avatar LandonTClipp commented on May 28, 2024

The issue most likely resides somewhere here. Specifically, it would be this switch case. Mockery may be accidentally throwing away the variadic-ness about this variable type.

This should be very easy to fix, because the types.Type object has a Variadic() bool method that tells you if it's, well, variadic. Then the renderTypeTuple method can be updated to print the correct ellipsis, instead of a slice.

There's the other consideration that you could technically have an arbitrarily deep nested function declaration

type ExposedFunction func(args ...func(args ...func(args ...bool))) interface{}

So the real solution would involve recursion, but I've never seen something like this out in the wild.

from mockery.

nicovak avatar nicovak commented on May 28, 2024

Thank you for your feedback, yes, handling the recursion now may be overkill.

What is the next step? I can do a PR to handle the case, but it will take me some time to ramp up on the project.

from mockery.

LandonTClipp avatar LandonTClipp commented on May 28, 2024

What time frame are you looking at to get a PR @nicovak? I'm always willing to do some dev work myself but we all lead busy lives so not sure how quickly I could do it.

from mockery.

LandonTClipp avatar LandonTClipp commented on May 28, 2024

Closing in favor of #431 as this is a duplicate issue. The solution lies within the code block I mentioned.

from mockery.

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.