Skip to content

Commit

Permalink
Use already existing URL in struct
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclmr committed Aug 9, 2023
1 parent 8198ef7 commit 3e74aaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/icm/download_owners.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func overwriteOwnersFile(writeOwnersCSV data.WriteOwnersCSVFunc, timestampUpdate
return err
}

owners, err := ownersDownloader.Download(ownerURL)
owners, err := ownersDownloader.Download()
if err != nil {
return err
}
Expand Down
6 changes: 3 additions & 3 deletions http/owners_downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ func NewOwnersDownloader(ownerURL string) OwnersDownloader {
}

type OwnersDownloader interface {
Download(ownerURL string) ([]cont.Owner, error)
Download() ([]cont.Owner, error)
}

func (od *ownersDownloader) Download(ownerURL string) ([]cont.Owner, error) {
resp, err := http.Get(ownerURL)
func (od *ownersDownloader) Download() ([]cont.Owner, error) {
resp, err := http.Get(od.ownerURL)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 3e74aaa

Please sign in to comment.