clean up and linting fix
This commit is contained in:
@@ -34,7 +34,7 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
||||
if !SetYes {
|
||||
// The checks run twice in the prompt case.
|
||||
// Avoiding putting in a blocking prompt in an API.
|
||||
apiprofile.AddProfile(&set, false)
|
||||
err = apiprofile.AddProfile(&set, false)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -549,16 +549,6 @@ func NodeStatus(nodeNames []string) (nodeStatusResponse *wwapiv1.NodeStatusRespo
|
||||
return
|
||||
}
|
||||
|
||||
// checkNetNameRequired is a helper for determining if netname is set.
|
||||
// Certain settings require it.
|
||||
func checkNetNameRequired(netname string) (err error) {
|
||||
if netname == "" {
|
||||
err = fmt.Errorf("You must include the '--netname' option")
|
||||
wwlog.Printf(wwlog.ERROR, fmt.Sprintf("%v\n", err.Error()))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
/*
|
||||
Add the netname to the options map, as its only known after the map
|
||||
command line options have been read out.
|
||||
|
||||
@@ -451,7 +451,7 @@ Return the names of all available profiles
|
||||
*/
|
||||
func (config *NodeYaml) ListAllProfiles() []string {
|
||||
var ret []string
|
||||
for name, _ := range config.NodeProfiles {
|
||||
for name := range config.NodeProfiles {
|
||||
ret = append(ret, name)
|
||||
}
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user