func (g *gsGetter) ClientMode(u *url.URL) (getter.ClientMode, error) {
	return getter.ClientModeInvalid, errors.New("mode is not supported for this client")
}
ClientMode is unsupported for gsGetter.
package brokerpak
import (
	"context"
	"errors"
	"fmt"
	"net/url"
	"os"
	"path/filepath"
	"strings"
	"time"
	"cloud.google.com/go/storage"
	"github.com/GoogleCloudPlatform/gcp-service-broker/utils"
	"github.com/GoogleCloudPlatform/gcp-service-broker/utils/stream"
	getter "github.com/hashicorp/go-getter"
	"golang.org/x/oauth2/google"
	"google.golang.org/api/option"
)
func fetchArchive(src, dest string) error {
	return newFileGetterClient(src, dest).Get()
}
func fetchBrokerpak(src, dest string) error {
	execWd := filepath.Dir(os.Args[0])
	execDir, err := filepath.Abs(execWd)
	if err != nil {
		return fmt.Errorf("couldn't turn dir %q into abs path: %v", execWd, err)
	}
	client := newFileGetterClient(src, dest)
	client.Getters["gs"] = &gsGetter{}
	client.Pwd = execDir
	return client.Get()
}
func defaultGetters() map[string]getter.Getter {
	getters := map[string]getter.Getter{}
	for k, g := range getter.Getters {
		getters[k] = g
	}
	return getters
}
func newFileGetterClient(src, dest string) *getter.Client {
	return &getter.Client{
		Src: src,
		Dst: dest,
		Mode:          getter.ClientModeFile,
		Getters:       defaultGetters(),
		Decompressors: map[string]getter.Decompressor{},
	}
}
type gsGetter struct{}