Linting fixes

This commit is contained in:
Gregory Kurtzer
2021-09-08 20:37:58 -07:00
parent 4b5e3fd6eb
commit f9b9c3a8c1
3 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
for _, arg := range args {
// Checking if container flag was set, then overwriting OptRoot
if OptContainer != "" {
if container.ValidSource(OptContainer) == true {
if container.ValidSource(OptContainer) {
OptRoot = container.RootFsDir(OptContainer)
} else {
wwlog.Printf(wwlog.ERROR, " %s is not a valid container", OptContainer)

View File

@@ -78,7 +78,7 @@ 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)

View File

@@ -53,7 +53,7 @@ func (c *Cache) checkEntry(id string) (string, error) {
func (c *Cache) createEntry(id string) (string, error) {
path := filepath.Join(c.rootfsDir(), id)
if err := os.MkdirAll(path, 755); err != nil {
if err := os.MkdirAll(path, 0755); err != nil {
return "", err
}