Skip to content

Commit

Permalink
[ply] Pretty-print UIDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
DHowett committed Mar 21, 2017
1 parent 6017651 commit 73cd20e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ply/prettyprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"reflect"
"sort"
"time"

"howett.net/plist"
)

func PrettyPrint(w io.Writer, val interface{}) {
Expand Down Expand Up @@ -61,6 +63,8 @@ func printValue(w io.Writer, val interface{}, depth string) {
printValue(w, v, nd)
}
fmt.Fprintf(w, "%s)\n", depth)
case plist.UID:
fmt.Fprintf(w, "#%d\n", uint64(tv))
case int64, uint64, string, float32, float64, bool, time.Time:
fmt.Fprintf(w, "%+v\n", tv)
case uint8:
Expand Down

0 comments on commit 73cd20e

Please sign in to comment.