Just small program which iterates over Google storage buckets in your project. Must run on computer/instance which is authenticated against Google Cloud.

package main

import (
"log"

// Imports the Google Cloud Storage client package.
"fmt"

"cloud.google.com/go/storage"
"golang.org/x/net/context"
"google.golang.org/api/iterator"
)

func main() {
ctx := context.Background()

// Sets your Google Cloud Platform project ID.
projectID := "your_project_id"

// Creates a client.
client, err := storage.NewClient(ctx)
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}

// Looks for all buckets
bucket := client.Buckets(ctx, projectID)

// Iterates over all buckets
if bucket != nil {
for {
bucketAttrs, err := bucket.Next()
if err == iterator.Done {
break
}
if err != nil {
log.Fatalf("error iterating over buckets: %v", err)
}
fmt.Println(bucketAttrs.Name)
}
}
}