From 5bc9425c548d6a1b1b648eefa530e2e703474649 Mon Sep 17 00:00:00 2001 From: Nan Monnand Deng Date: Fri, 5 Sep 2014 17:37:55 -0400 Subject: [PATCH] panic->error --- storage/bigquery/bigquery.go | 4 ++-- storage/influxdb/influxdb.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/storage/bigquery/bigquery.go b/storage/bigquery/bigquery.go index bafd411e..168df090 100644 --- a/storage/bigquery/bigquery.go +++ b/storage/bigquery/bigquery.go @@ -436,7 +436,7 @@ func (self *bigqueryStorage) RecentStats(containerName string, numStats int) ([] } func (self *bigqueryStorage) Samples(containerName string, numSamples int) ([]*info.ContainerStatsSample, error) { - panic("will be removed") + return nil, fmt.Errorf("will be removed") } func (self *bigqueryStorage) Close() error { @@ -450,7 +450,7 @@ func (self *bigqueryStorage) Percentiles( cpuUsagePercentiles []int, memUsagePercentiles []int, ) (*info.ContainerStatsPercentiles, error) { - panic("will be removed") + return nil, fmt.Errorf("will be removed") } // Create a new bigquery storage driver. diff --git a/storage/influxdb/influxdb.go b/storage/influxdb/influxdb.go index c1934c77..fdf1283b 100644 --- a/storage/influxdb/influxdb.go +++ b/storage/influxdb/influxdb.go @@ -270,7 +270,7 @@ func (self *influxdbStorage) RecentStats(containerName string, numStats int) ([] } func (self *influxdbStorage) Samples(containerName string, numSamples int) ([]*info.ContainerStatsSample, error) { - panic("should not implement") + return nil, fmt.Errorf("will be removed") } func (self *influxdbStorage) Close() error { @@ -283,7 +283,7 @@ func (self *influxdbStorage) Percentiles( cpuUsagePercentiles []int, memUsagePercentiles []int, ) (*info.ContainerStatsPercentiles, error) { - panic("should not implement") + return nil, fmt.Errorf("will be removed") } // Returns a new influxdb series.