Merge pull request #2228 from dashpole/code_safe_changes
Fix code safe linter errors
This commit is contained in:
commit
60d438652e
@ -218,7 +218,7 @@ func setMaxProcs() {
|
|||||||
|
|
||||||
func installSignalHandler(containerManager manager.Manager) {
|
func installSignalHandler(containerManager manager.Manager) {
|
||||||
c := make(chan os.Signal, 1)
|
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.
|
// Block until a signal is received.
|
||||||
go func() {
|
go func() {
|
||||||
|
@ -162,7 +162,6 @@ func PushAndRunTests(host, testDir string) (result error) {
|
|||||||
resp, err := http.Get(fmt.Sprintf("http://%s:%s/healthz", host, portStr))
|
resp, err := http.Get(fmt.Sprintf("http://%s:%s/healthz", host, portStr))
|
||||||
if err == nil && resp.StatusCode == http.StatusOK {
|
if err == nil && resp.StatusCode == http.StatusOK {
|
||||||
done = true
|
done = true
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,10 +66,10 @@ func (self *NetlinkReader) GetCpuLoad(name string, path string) (info.LoadStats,
|
|||||||
}
|
}
|
||||||
|
|
||||||
cfd, err := os.Open(path)
|
cfd, err := os.Open(path)
|
||||||
defer cfd.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return info.LoadStats{}, fmt.Errorf("failed to open cgroup path %s: %q", path, err)
|
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)
|
stats, err := getLoadStats(self.familyId, cfd, self.conn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user