Merge pull request #2228 from dashpole/code_safe_changes

Fix code safe linter errors
This commit is contained in:
David Ashpole 2019-09-05 14:11:54 -07:00 committed by GitHub
commit 60d438652e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View File

@ -218,7 +218,7 @@ func setMaxProcs() {
func installSignalHandler(containerManager manager.Manager) {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, os.Kill, syscall.SIGTERM)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
// Block until a signal is received.
go func() {

View File

@ -162,7 +162,6 @@ func PushAndRunTests(host, testDir string) (result error) {
resp, err := http.Get(fmt.Sprintf("http://%s:%s/healthz", host, portStr))
if err == nil && resp.StatusCode == http.StatusOK {
done = true
break
}
}
}

View File

@ -66,10 +66,10 @@ func (self *NetlinkReader) GetCpuLoad(name string, path string) (info.LoadStats,
}
cfd, err := os.Open(path)
defer cfd.Close()
if err != nil {
return info.LoadStats{}, fmt.Errorf("failed to open cgroup path %s: %q", path, err)
}
defer cfd.Close()
stats, err := getLoadStats(self.familyId, cfd, self.conn)
if err != nil {