func (o *options) validate() error {
	if o.config.String() == "" {
		return errors.New("empty --config")
	}
	if o.config.Bucket() == "k8s-testgrid" && o.gridPrefix == "" && o.confirm {
		return fmt.Errorf("--config=%s: cannot write grid state to gs://k8s-testgrid", o.config)
	}
	if o.groupConcurrency == 0 {
		o.groupConcurrency = runtime.NumCPU()
	}
	if o.buildConcurrency == 0 {
		o.buildConcurrency = runtime.NumCPU()
		if o.buildConcurrency > 4 {
			o.buildConcurrency = 4
		}
	}
	return subscribeGCS(o.subscriptions.Strings()...)
}
validate ensures sane options
package main
import (
	"context"
	"errors"
	"flag"
	"fmt"
	"os"
	"runtime"
	"strings"
	"time"
	gpubsub "cloud.google.com/go/pubsub"
	"github.com/GoogleCloudPlatform/testgrid/pkg/pubsub"
	"github.com/GoogleCloudPlatform/testgrid/pkg/updater"
	"github.com/GoogleCloudPlatform/testgrid/util/gcs"
	"github.com/GoogleCloudPlatform/testgrid/util/metrics"
	"github.com/sirupsen/logrus"
	"google.golang.org/api/option"
)
type Strings struct {
	vals []string
}
func (s *Strings) Strings() []string {
	return s.vals
}
func (s *Strings) String() string {
	return strings.Join(s.vals, ",")
}
func (s *Strings) Set(value string) error {
	s.vals = append(s.vals, value)
	return nil
}
type options struct {
	config           gcs.Path  
	creds            string
	confirm          bool
	groups           Strings
	groupConcurrency int
	buildConcurrency int
	wait             time.Duration
	groupTimeout     time.Duration
	buildTimeout     time.Duration
	gridPrefix       string
	subscriptions    Strings
	debug    bool
	trace    bool
	jsonLogs bool
}