Skip to content

Commit dc70446

Browse files
committed
photon: remove http.DefaultClient
Signed-off-by: Hank Donnay <[email protected]>
1 parent ee42390 commit dc70446

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

photon/photon.go

-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package photon
22

33
import (
44
"fmt"
5-
"net/http"
65
"net/url"
76

87
"github.com/quay/claircore/libvuln/driver"
@@ -43,9 +42,6 @@ func NewUpdater(r Release, opts ...Option) (*Updater, error) {
4342
return nil, err
4443
}
4544
}
46-
if u.Fetcher.Client == nil {
47-
u.Fetcher.Client = http.DefaultClient // TODO(hank) Remove DefaultClient
48-
}
4945
if u.Fetcher.URL == nil {
5046
var err error
5147
u.Fetcher.URL, err = upstreamBase.Parse("com.vmware.phsa-" + string(u.release) + ".xml")
@@ -77,16 +73,6 @@ func WithURL(uri, compression string) Option {
7773
}
7874
}
7975

80-
// WithClient sets an http.Client for use with an Updater.
81-
//
82-
// If this Option is not supplied, http.DefaultClient will be used.
83-
func WithClient(c *http.Client) Option {
84-
return func(u *Updater) error {
85-
u.Fetcher.Client = c
86-
return nil
87-
}
88-
}
89-
9076
// Name satisfies driver.Updater.
9177
func (u *Updater) Name() string {
9278
return fmt.Sprintf(`photon-updater-%s`, u.release)

0 commit comments

Comments
 (0)