Enable errcheck linter and resolve found issues.

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
This commit is contained in:
Xun Jiang
2023-04-28 09:33:42 +08:00
parent fbba4e5c77
commit f051ecaee9
19 changed files with 124 additions and 41 deletions
+3 -1
View File
@@ -162,7 +162,9 @@ func getKubectlVersion() (string, error) {
case <-time.After(kubectlTimeout):
// we don't care about the possible error returned from Kill() here,
// just return an empty string
kubectlCmd.Process.Kill()
if err := kubectlCmd.Process.Kill(); err != nil {
return "", fmt.Errorf("error killing kubectl process: %w", err)
}
return "", errors.New("timeout waiting for kubectl version")
case err := <-done: