NewHTTPGetter constructs a valid http/https client as a Getter
(options ...Option)
| 106 | |
| 107 | // NewHTTPGetter constructs a valid http/https client as a Getter |
| 108 | func NewHTTPGetter(options ...Option) (Getter, error) { |
| 109 | var client HTTPGetter |
| 110 | |
| 111 | for _, opt := range options { |
| 112 | opt(&client.opts) |
| 113 | } |
| 114 | |
| 115 | return &client, nil |
| 116 | } |
| 117 | |
| 118 | func (g *HTTPGetter) httpClient(opts getterOptions) (*http.Client, error) { |
| 119 | if opts.transport != nil { |
no outgoing calls
searching dependent graphs…