Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Commit e4eb62c

Browse files
authored
Merge pull request #56 from zhouhao3/fix-ineffassign
fix ineffectual assignment to err
2 parents 8250085 + cf39e60 commit e4eb62c

File tree

1 file changed

+3
-0
lines changed
  • virtualcluster/cmd/kubectl-vc

1 file changed

+3
-0
lines changed

virtualcluster/cmd/kubectl-vc/util.go

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ func readFromFileOrURL(path string) ([]byte, error) {
9494
defer resp.Body.Close()
9595

9696
yamlContent, err := ioutil.ReadAll(resp.Body)
97+
if err != nil {
98+
return nil, err
99+
}
97100
return yamlContent, nil
98101
}
99102
// read from a file

0 commit comments

Comments
 (0)