1
0
mirror of https://github.com/rancher/os.git synced 2025-09-12 13:17:17 +00:00

make golang files to pass the latest go lints

- use constructors with named fields
- fix logf statements
This commit is contained in:
Lonnie Liu
2021-02-15 09:13:14 -08:00
committed by Olli Janatuinen
parent 6fd46ddee4
commit 6cde287f87
8 changed files with 44 additions and 38 deletions

View File

@@ -146,7 +146,7 @@ func installAction(c *cli.Context) error {
partition := c.String("partition")
statedir := c.String("statedir")
if statedir != "" && installType != "noformat" {
log.Fatal("--statedir %s requires --type noformat", statedir)
log.Fatalf("--statedir %s requires --type noformat", statedir)
}
if installType != "noformat" &&
installType != "raid" &&
@@ -531,7 +531,7 @@ func layDownOS(image, installType, cloudConfig, device, partition, statedir, kap
if err != nil {
return err
}
log.Debugf("upgrading - %s, %s, %s, %s", device, baseName, diskType)
log.Debugf("upgrading - %s, %s, %s", device, baseName, diskType)
// TODO: detect pv-grub, and don't kill it with syslinux
upgradeBootloader(device, baseName, diskType)
default:
@@ -553,7 +553,13 @@ func layDownOS(image, installType, cloudConfig, device, partition, statedir, kap
Timeout: 0,
Fallback: 0, // need to be conditional on there being a 'rollback'?
Entries: []install.MenuEntry{
install.MenuEntry{"BurmillaOS-current", config.BootDir, VERSION, kernelArgs, kappend},
install.MenuEntry{
Name: "BurmillaOS-current",
BootDir: config.BootDir,
Version: VERSION,
KernelArgs: kernelArgs,
Append: kappend,
},
},
}
install.PvGrubConfig(menu)