Get performs a Get from repo.Getter and returns the body.
(href string, options ...Option)
| 38 | |
| 39 | // Get performs a Get from repo.Getter and returns the body. |
| 40 | func (g *HTTPGetter) Get(href string, options ...Option) (*bytes.Buffer, error) { |
| 41 | // Create a local copy of options to avoid data races when Get is called concurrently |
| 42 | opts := g.opts |
| 43 | for _, opt := range options { |
| 44 | opt(&opts) |
| 45 | } |
| 46 | return g.get(href, opts) |
| 47 | } |
| 48 | |
| 49 | func (g *HTTPGetter) get(href string, opts getterOptions) (*bytes.Buffer, error) { |
| 50 | // Set a helm specific user agent so that a repo server and metrics can |