-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem Statement
I printed some out for debugging, using fmt.Println, and was surprised to get output like
{offset {2 5111 <nil>}} {len {2 235 <nil>}} {read.duration {4 0 3.291µs <nil>}}
Proposed Solution
Implement the Stringer interface, which fmt looks for - a single method String() string, to output some human-readable version of the data.
This could use the existing Value.Emit method. (suggestion from @pellared)
Alternatives
Could document that anyone looking to print out Value should call Emit().
Prior Art
https://go.dev/doc/effective_go#printing
Additional Context
There is already a method Value.AsString; having both this and String could perhaps be confusing.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
pellared
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request