Skip to content

Conversation

@aerth
Copy link

@aerth aerth commented Dec 17, 2017

With these changes, one can add a struct field tag pretty:"-" to ignore pretty printing a particular field.

For example, the "z" field would not be pretty printed in the following struct

type testFieldTag struct {
	x, y int
	z string `pretty:"-"`
}

Now print long embedded structs prettier

@aerth aerth force-pushed the master branch 2 times, most recently from 8c0c177 to dae10db Compare December 30, 2020 03:09
@aerth
Copy link
Author

aerth commented Dec 30, 2020

rebased and refactored... added a few test cases. seems to be working good

@NicklasWallgren
Copy link

Can we get this merged?

@sean-
Copy link

sean- commented Nov 3, 2022

Bumping this with a +1. When debugging a library that embeds a very complicated, external data structure, the volume of output from external dependencies can dwarf the local code, making pretty's output more difficult to digest than it needs to be.

@aerth aerth force-pushed the master branch 5 times, most recently from a1b6e35 to 4943660 Compare November 6, 2022 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants