Fix staticcheck (ST1005) errors

staticcheck was complaining as some of the error messages returned by
govmm began with a capital letter.  This commit fixes the issue.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
This commit is contained in:
Mark Ryan
2019-01-28 15:32:07 +01:00
parent 737f03de59
commit 4beea5133e
2 changed files with 19 additions and 19 deletions

View File

@@ -51,18 +51,18 @@ func CreateCloudInitISO(ctx context.Context, scratchDir, isoPath string,
err := os.MkdirAll(dataDirPath, 0750)
if err != nil {
return fmt.Errorf("Unable to create config drive directory %s : %v",
return fmt.Errorf("unable to create config drive directory %s : %v",
dataDirPath, err)
}
err = ioutil.WriteFile(metaDataPath, metaData, 0644)
if err != nil {
return fmt.Errorf("Unable to create %s : %v", metaDataPath, err)
return fmt.Errorf("unable to create %s : %v", metaDataPath, err)
}
err = ioutil.WriteFile(userDataPath, userData, 0644)
if err != nil {
return fmt.Errorf("Unable to create %s : %v", userDataPath, err)
return fmt.Errorf("unable to create %s : %v", userDataPath, err)
}
cmd := exec.CommandContext(ctx, "xorriso", "-as", "mkisofs", "-R", "-V", "config-2",
@@ -70,7 +70,7 @@ func CreateCloudInitISO(ctx context.Context, scratchDir, isoPath string,
cmd.SysProcAttr = attr
err = cmd.Run()
if err != nil {
return fmt.Errorf("Unable to create cloudinit iso image %v", err)
return fmt.Errorf("unable to create cloudinit iso image %v", err)
}
return nil