Update use of wwlog.Info to specify a format string

Since wwlog.Info() expect a format string, accidental inclusion of a
format string in the payload causes an error.

See also #1382, #1363

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-09-25 13:35:06 -06:00
parent aa8282ad10
commit e99e8c3dbb
3 changed files with 6 additions and 6 deletions

View File

@@ -44,7 +44,7 @@ func CobraRunE(vars *variables) func(cmd *cobra.Command, args []string) (err err
})
}
ph.Render()
wwlog.Info(ph.String())
wwlog.Info("%s", ph.String())
} else if vars.kernel {
ph := helper.New([]string{"CONTAINER NAME", "NODES", "KERNEL VERSION"})
for i := 0; i < len(containerInfo); i++ {
@@ -55,7 +55,7 @@ func CobraRunE(vars *variables) func(cmd *cobra.Command, args []string) (err err
})
}
ph.Render()
wwlog.Info(ph.String())
wwlog.Info("%s", ph.String())
} else if showSize {
ph := helper.New([]string{"CONTAINER NAME", "NODES", "SIZE"})
for i := 0; i < len(containerInfo); i++ {
@@ -74,7 +74,7 @@ func CobraRunE(vars *variables) func(cmd *cobra.Command, args []string) (err err
})
}
ph.Render()
wwlog.Info(ph.String())
wwlog.Info("%s", ph.String())
}
} else {
ph := helper.New([]string{"CONTAINER NAME"})
@@ -83,7 +83,7 @@ func CobraRunE(vars *variables) func(cmd *cobra.Command, args []string) (err err
ph.Append([]string{cont})
}
ph.Render()
wwlog.Info(ph.String())
wwlog.Info("%s", ph.String())
}
return
}

View File

@@ -45,7 +45,7 @@ func CobraRunE(vars *variables) func(cmd *cobra.Command, args []string) (err err
ph.Append(strings.Split(val, ":=:"))
}
ph.Render()
wwlog.Info(ph.String())
wwlog.Info("%s", ph.String())
}
}
return

View File

@@ -37,7 +37,7 @@ func CobraRunE(vars *variables) func(cmd *cobra.Command, args []string) (err err
ph.Append(strings.Split(val, ":=:"))
}
ph.Render()
wwlog.Info(ph.String())
wwlog.Info("%s", ph.String())
}
}
return