Skip to content

Conversation

@otaku
Copy link

@otaku otaku commented Dec 26, 2014

An implementation for /issues/16 but also includes fmt.Stringer with priority given to Stringer before TextMarshaler.

I copied /pull/17 test implementation and added two other test cases.

formatter.go Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assign a value on line 172 and I will be typed in each case so this line would reduce to p.fmtString(v.String(), true) and the other case would be simplified similarly.

@otaku
Copy link
Author

otaku commented Dec 26, 2014

One thing about this though is this will hide the actual fields, but generally it's helpful in cases such as time.Time. Would it be helpful to add prefix in for these cases?
"&time.Time{(Stringer) "2013-10-01 00:00:00 +0000 UTC"},

@ruzz311
Copy link

ruzz311 commented Aug 26, 2015

+1 or can it use GoStringer?

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.

3 participants