GithubHelp home page GithubHelp logo

Comments (3)

cee-dub avatar cee-dub commented on July 17, 2024

Thanks for the report, especially the simple code to reproduce. I'll see if I can take a look at this, unless you have started on a fix already?

from pretty.

dgouldin avatar dgouldin commented on July 17, 2024

I don't have a fix, but my suggestion would probably be to call out the field that differs but not compute the diff itself when the field is private.

from pretty.

cee-dub avatar cee-dub commented on July 17, 2024

I looked into this last night, but I had some degree of trouble deciphering the output from diff_test.go after making some changes in an attempt to fix the problem.

Your suggestion makes some sense, but it doesn't really address the use case of someone trying to determine how the values are actually different. I think that limits its utility (granted, it's better than a panic!).

I don't have more time in my schedule to look at it this week, unfortunately. If I had the time, I would start by updating the tests to cover your case (use a struct that has typed private fields, not just interface{} fields, including some as pointers) and also consider updating the test helpers to make it easier to decipher the failure messages. With that, the changes in diff.go should be fairly straightforward.

On Jan 27, 2015, at 19:37, David Gouldin [email protected] wrote:

I don't have a fix, but my suggestion would probably be to call out the field that differs but not compute the diff itself when the field is private.


Reply to this email directly or view it on GitHub.

from pretty.

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.