]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - vendor/github.com/hashicorp/go-getter/get_base.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / go-getter / get_base.go
1 package getter
2
3 import "context"
4
5 // getter is our base getter; it regroups
6 // fields all getters have in common.
7 type getter struct {
8 client *Client
9 }
10
11 func (g *getter) SetClient(c *Client) { g.client = c }
12
13 // Context tries to returns the Contex from the getter's
14 // client. otherwise context.Background() is returned.
15 func (g *getter) Context() context.Context {
16 if g == nil || g.client == nil {
17 return context.Background()
18 }
19 return g.client.Ctx
20 }