Fixed formatting across entire project

This commit is contained in:
Gregory Kurtzer
2021-08-21 08:04:47 -07:00
parent 4d37c87c7b
commit a82e1b0ea5
20 changed files with 41 additions and 40 deletions

View File

@@ -29,7 +29,7 @@ type NodeConf struct {
IpmiIpaddr string `yaml:"ipmi ipaddr,omitempty"`
IpmiNetmask string `yaml:"ipmi netmask,omitempty"`
IpmiGateway string `yaml:"ipmi gateway,omitempty"`
IpmiInterface string `yaml:"ipmi interface,omitempty"`
IpmiInterface string `yaml:"ipmi interface,omitempty"`
RuntimeOverlay string `yaml:"runtime overlay,omitempty"`
SystemOverlay string `yaml:"system overlay,omitempty"`
Init string `yaml:"init,omitempty"`
@@ -107,8 +107,8 @@ func init() {
c, err := os.OpenFile(ConfigFile, os.O_RDWR|os.O_CREATE, 0644)
if err != nil {
wwlog.Printf(wwlog.ERROR, "Could not create new configuration file: %s\n", err)
// just return silently, as init is also called for bash_completion
return
// just return silently, as init is also called for bash_completion
return
}
fmt.Fprintf(c, "nodeprofiles:\n")

View File

@@ -159,7 +159,7 @@ func (config *nodeYaml) ProfileUpdate(profile NodeInfo) error {
config.NodeProfiles[profileID].Profiles = profile.Profiles
config.NodeProfiles[profileID].NetDevs = make(map[string]*NetDevs)
config.NodeProfiles[profileID].Keys = make(map[string]string)
for devname, netdev := range profile.NetDevs {

View File

@@ -16,8 +16,8 @@ type IPMI struct {
User string
Password string
AuthType string
Interface string
result IPMIResult
Interface string
result IPMIResult
}
func (ipmi *IPMI) Result() (string, error) {
@@ -28,9 +28,9 @@ func (ipmi *IPMI) Command(ipmiArgs []string) ([]byte, error) {
var args []string
if ipmi.Interface == "" {
ipmi.Interface = "lanplus"
}
if ipmi.Interface == "" {
ipmi.Interface = "lanplus"
}
args = append(args, "-I", ipmi.Interface, "-H", ipmi.HostName, "-U", ipmi.User, "-P", ipmi.Password)
args = append(args, ipmiArgs...)
ipmiCmd := exec.Command("ipmitool", args...)
@@ -41,9 +41,9 @@ func (ipmi *IPMI) InteractiveCommand(ipmiArgs []string) error {
var args []string
if ipmi.Interface == "" {
ipmi.Interface = "lan"
}
if ipmi.Interface == "" {
ipmi.Interface = "lan"
}
args = append(args, "-I", ipmi.Interface, "-H", ipmi.HostName, "-U", ipmi.User, "-P", ipmi.Password)
args = append(args, ipmiArgs...)

View File

@@ -1,7 +1,6 @@
package warewulfconf
import (
"github.com/hpcng/warewulf/internal/pkg/util"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
)
@@ -51,7 +50,7 @@ func init() {
//TODO: Check to make sure nodes.conf is found
if util.IsFile(ConfigFile) == false {
wwlog.Printf(wwlog.ERROR, "Configuration file not found: %s\n", ConfigFile)
// fail silently as this also called by bash_completion
return
// fail silently as this also called by bash_completion
return
}
}