1
0
mirror of https://github.com/rancher/os.git synced 2025-09-20 18:13:35 +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

@@ -101,8 +101,8 @@ func SysInit() error {
_, err := config.ChainCfgFuncs(cfg,
config.CfgFuncs{
{"loadSystemImages", LoadSystemImages},
{"start project", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
{Name: "loadSystemImages", Func: LoadSystemImages},
{Name: "start project", Func: func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
p, err := compose.GetProject(cfg, false, true)
if err != nil {
return cfg, err
@@ -114,11 +114,11 @@ func SysInit() error {
Log: cfg.Rancher.Log,
})
}},
{"sync", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
{Name: "sync", Func: func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
syscall.Sync()
return cfg, nil
}},
{"banner", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
{Name: "banner", Func: func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
log.Infof("BurmillaOS %s started", config.Version)
return cfg, nil
}}})