Fix linting issues
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user