wwlog provides named loggers for each level, which requires less code and is clearer than wwlog.Printf. The code has included a mix of both, but this commit consolidates existing code on the per-level functions. Signed-off-by: Jonathon Anderson <janderson@ciq.co>
21 lines
330 B
Go
21 lines
330 B
Go
package create
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/hpcng/warewulf/internal/pkg/overlay"
|
|
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func CobraRunE(cmd *cobra.Command, args []string) error {
|
|
|
|
err := overlay.OverlayInit(args[0])
|
|
if err != nil {
|
|
wwlog.Error("%s\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
return nil
|
|
}
|