From 2ecd8d94fb0d89f945d4911143a0d640bce45936 Mon Sep 17 00:00:00 2001 From: JBD Date: Thu, 8 Mar 2018 15:07:37 -0800 Subject: [PATCH] Regenerate README and make minor style improvement (#535) --- README.md | 7 +++---- internal/readme/stats.go | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2b6eb2683..575673ff7 100644 --- a/README.md +++ b/README.md @@ -159,13 +159,12 @@ i.e. no grouping by tag. [embedmd]:# (stats.go view) ```go -err = view.Subscribe(&view.View{ +if err = view.Subscribe(&view.View{ Name: "my.org/video_size_distribution", Description: "distribution of processed video size over time", Measure: videoSize, - Aggregation: view.DistributionAggregation{0, 1 << 32, 2 << 32, 3 << 32}, -}) -if err != nil { + Aggregation: view.DistributionAggregation([]float64{0, 1 << 32, 2 << 32, 3 << 32}), +}); err != nil { log.Fatalf("Failed to subscribe to view: %v", err) } ``` diff --git a/internal/readme/stats.go b/internal/readme/stats.go index c5d55c249..494968d88 100644 --- a/internal/readme/stats.go +++ b/internal/readme/stats.go @@ -57,13 +57,12 @@ func statsExamples() { _, _, _, _ = distAgg, countAgg, sumAgg, meanAgg // START view - err = view.Subscribe(&view.View{ + if err = view.Subscribe(&view.View{ Name: "my.org/video_size_distribution", Description: "distribution of processed video size over time", Measure: videoSize, - Aggregation: view.DistributionAggregation{0, 1 << 32, 2 << 32, 3 << 32}, - }) - if err != nil { + Aggregation: view.DistributionAggregation([]float64{0, 1 << 32, 2 << 32, 3 << 32}), + }); err != nil { log.Fatalf("Failed to subscribe to view: %v", err) } // END view