Fix linting issues

This commit is contained in:
WestleyR
2021-09-06 12:03:04 -07:00
parent 31e9929984
commit 4edc16953e
71 changed files with 470 additions and 363 deletions

View File

@@ -24,7 +24,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
dest = source
}
if SystemOverlay == true {
if SystemOverlay {
wwlog.Printf(wwlog.VERBOSE, "Importing '%s' into system overlay '%s:%s'\n", source, overlayName, dest)
overlaySource = config.SystemOverlaySource(overlayName)
} else {
@@ -32,7 +32,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
overlaySource = config.RuntimeOverlaySource(overlayName)
}
if util.IsDir(overlaySource) == false {
if !util.IsDir(overlaySource) {
wwlog.Printf(wwlog.ERROR, "Overlay does not exist: %s\n", overlayName)
os.Exit(1)
}
@@ -44,7 +44,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
os.Exit(1)
}
if NoOverlayUpdate == false {
if !NoOverlayUpdate {
n, err := node.New()
if err != nil {
wwlog.Printf(wwlog.ERROR, "Could not open node configuration: %s\n", err)
@@ -60,14 +60,14 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
var updateNodes []node.NodeInfo
for _, node := range nodes {
if SystemOverlay == true && node.SystemOverlay.Get() == overlayName {
if SystemOverlay && node.SystemOverlay.Get() == overlayName {
updateNodes = append(updateNodes, node)
} else if node.RuntimeOverlay.Get() == overlayName {
updateNodes = append(updateNodes, node)
}
}
if SystemOverlay == true {
if SystemOverlay {
wwlog.Printf(wwlog.INFO, "Updating System Overlays...\n")
return overlay.BuildSystemOverlay(updateNodes)
} else {