Skip to content

Commit

Permalink
Decuddle some returns
Browse files Browse the repository at this point in the history
  • Loading branch information
splaspood committed Apr 12, 2024
1 parent 874ca0d commit 30d6b11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/asrockrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ func NewAsrockrackVendorConfigManager(configFormat string, vendorOptions map[str
// FindMenu locates an existing asrockrackBiosCfgMenu if one exists in the ConfigData, if not
// it creates one and returns a pointer to that.
func (cm *asrockrackVendorConfig) FindMenu(menuName string) (m *asrockrackBiosCfgMenu) {
if cm.ConfigData.BiosCfg.Menus == nil {
return
}

for _, m = range cm.ConfigData.BiosCfg.Menus {
if m.Name == menuName {
return
Expand Down
2 changes: 2 additions & 0 deletions config/dell.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ func (cm *dellVendorConfig) Marshal() (string, error) {
if err != nil {
return "", err
}

return string(x), nil
case "json":
x, err := json.Marshal(cm.ConfigData.SystemConfiguration)
if err != nil {
return "", err
}

return string(x), nil
default:
return "", UnknownConfigFormatError(strings.ToLower(cm.ConfigFormat))
Expand Down

0 comments on commit 30d6b11

Please sign in to comment.