terraform-provider-google/vendor/github.com/hashicorp/go-getter/get_base.go
Nathan McKinley 808775c12c
update to hashicorp/go-getter (#2922)
* update to hashicorp/go-getter

* go mod vendor.

* go mod tidy
2019-01-23 18:07:01 -08:00

21 lines
457 B
Go

package getter
import "context"
// getter is our base getter; it regroups
// fields all getters have in common.
type getter struct {
client *Client
}
func (g *getter) SetClient(c *Client) { g.client = c }
// Context tries to returns the Contex from the getter's
// client. otherwise context.Background() is returned.
func (g *getter) Context() context.Context {
if g == nil || g.client == nil {
return context.Background()
}
return g.client.Ctx
}