-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attr.AppendValue was originally intended to be a convenient and more efficient way of formatting Attr values. But there is no one clearly right way to format them, and the efficiency argument doesn't really hold water: AppendValue skips the redundant but cheap type check that occurs in switch a.Kind() { case IntKind: ... a.Int() .. but then formats Times and Durations as strings instead of integers. We keep it internally to help out in a couple of places, but overall it's better if Handler implementations do their own value formatting. For casual use, fmt.Sprint(a.Value()) is fine. Change-Id: Ie265f1ee5daf5f8002bfc2b70f4bf461cb07a10b Reviewed-on: https://go-review.googlesource.com/c/exp/+/430098 Run-TryBot: Jonathan Amsterdam <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
- Loading branch information
Showing
4 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters