Fix go vet warnings

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
This commit is contained in:
Alexandr Morozov
2014-08-13 11:37:30 +04:00
parent 64579f51fc
commit 391c35c822
8 changed files with 24 additions and 13 deletions
+12 -2
View File
@@ -64,7 +64,12 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
}
c.Terminal = term
c.Mounts = append(c.Mounts, execdriver.Mount{d.initPath, c.InitPath, false, true})
c.Mounts = append(c.Mounts, execdriver.Mount{
Source: d.initPath,
Destination: c.InitPath,
Writable: false,
Private: true,
})
if err := d.generateEnvConfig(c); err != nil {
return -1, err
@@ -440,7 +445,12 @@ func (d *driver) generateEnvConfig(c *execdriver.Command) error {
return err
}
p := path.Join(d.root, "containers", c.ID, "config.env")
c.Mounts = append(c.Mounts, execdriver.Mount{p, "/.dockerenv", false, true})
c.Mounts = append(c.Mounts, execdriver.Mount{
Source: p,
Destination: "/.dockerenv",
Writable: false,
Private: true,
})
return ioutil.WriteFile(p, data, 0600)
}
+1 -1
View File
@@ -61,6 +61,6 @@ func initializer() {
}
func writeError(err error) {
fmt.Sprint(os.Stderr, err)
fmt.Fprint(os.Stderr, err)
os.Exit(1)
}