Skip to content

Commit

Permalink
pkg/repository: fix comment by make check
Browse files Browse the repository at this point in the history
  • Loading branch information
9547 committed Sep 14, 2020
1 parent 1439efb commit 8c22ea8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/repository/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ func (l *MockMirror) Download(resource, targetDir string) error {
return err
}
defer file.Close()
file.Write([]byte(content))
return nil
_, err = file.Write([]byte(content))
return err
}

// Fetch implements Mirror.
Expand Down
2 changes: 1 addition & 1 deletion pkg/repository/v1_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ func (r *V1Repository) FetchComponent(item *v1manifest.VersionItem) (io.Reader,
return checkHash(reader, item.Hashes[v1manifest.SHA256])
}

// DoDownloadComponent downloads the component specified by item into local file
// DownloadComponent downloads the component specified by item into local file
func (r *V1Repository) DownloadComponent(item *v1manifest.VersionItem, target string) error {
targetDir := filepath.Dir(target)
err := r.mirror.Download(item.URL, targetDir)
Expand Down

0 comments on commit 8c22ea8

Please sign in to comment.