Add comments and fix common lint issues

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-10-20 11:46:19 -04:00
parent 9bd1dc78cb
commit 5fd0415985
15 changed files with 60 additions and 38 deletions

View File

@@ -46,10 +46,7 @@ func NewLoopback(size int64) (string, func() error, error) {
// remove file
logrus.Debugf("Removing temporary file %s", file.Name())
if err = os.Remove(file.Name()); err != nil {
return err
}
return nil
return os.Remove(file.Name())
}
return deviceName, cleanup, nil