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

Commit cf39e60

Browse files
committed
fix ineffectual assignment to err
Signed-off-by: Zhou Hao <[email protected]>
1 parent 8250085 commit cf39e60

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)