From 8685028771693b83cb72c5fba22b0930699928c9 Mon Sep 17 00:00:00 2001 From: Justin Li Date: Thu, 24 Jul 2014 20:30:11 -0400 Subject: [PATCH] Formatting --- stats/stats.go | 6 +++--- stats/struct_flattener.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stats/stats.go b/stats/stats.go index 74b4d69..018bb5f 100644 --- a/stats/stats.go +++ b/stats/stats.go @@ -51,10 +51,10 @@ type PeerClassStats struct { } type PeerStats struct { - PeerClassStats `json:"Peers"` - Seeds PeerClassStats `json:"Seeds"` + PeerClassStats `json:"Peers"` // Stats for all peers. - Completed uint64 // Number of transitions from leech to seed. + Seeds PeerClassStats // Stats for seeds only. + Completed uint64 // Number of transitions from leech to seed. } type PercentileTimes struct { diff --git a/stats/struct_flattener.go b/stats/struct_flattener.go index dfc4f88..48dfb78 100644 --- a/stats/struct_flattener.go +++ b/stats/struct_flattener.go @@ -82,9 +82,9 @@ func recursiveFlatten(val reflect.Value, prefix string, output FlatMap) int { return added } -func flattenPointer(val reflect.Value) FlatMap { +func flattenValue(val reflect.Value) FlatMap { if val.Kind() == reflect.Ptr { - return flattenPointer(val.Elem()) + return flattenValue(val.Elem()) } if val.Kind() != reflect.Struct {