cmd/buildstats: fix breaking API change in dependency

CL https://code-review.googlesource.com/#/c/9567/ unexported
bigquery.ValueList, which broke the code in this project. Switch the
buildstats code per the suggestion in the linked commit.

Fixes golang/go#18764.

Change-Id: I55b748f65732d5627d966623cd3b0e73223b16be
Reviewed-on: https://go-review.googlesource.com/35572
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Kevin Burke 2017-01-23 14:08:10 -08:00 коммит произвёл Brad Fitzpatrick
Родитель 84c3f714d2
Коммит 2888211c41
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -15,10 +15,9 @@ import (
"reflect"
"time"
"golang.org/x/build/types"
"cloud.google.com/go/bigquery"
"cloud.google.com/go/datastore"
"golang.org/x/build/types"
"google.golang.org/api/iterator"
)
@ -60,7 +59,7 @@ func sync(ctx context.Context) {
if err != nil {
log.Fatalf("Read: %v", err)
}
var values bigquery.ValueList
var values *[]bigquery.Value
err = it.Next(&values)
if err == iterator.Done {
log.Fatalf("No result.")
@ -68,7 +67,7 @@ func sync(ctx context.Context) {
if err != nil {
log.Fatalf("Next: %v", err)
}
t, ok := values[0].(time.Time)
t, ok := (*values)[0].(time.Time)
if !ok {
log.Fatalf("not a time")
}