Skip to content

Commit

Permalink
config/dell.go: Remove debug print statements from Marshal()
Browse files Browse the repository at this point in the history
  • Loading branch information
splaspood committed Mar 26, 2024
1 parent fffe54a commit 874ca0d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions config/dell.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package config
import (
"encoding/json"
"encoding/xml"
"fmt"
"strings"
)

Expand All @@ -19,7 +18,7 @@ type dellConfig struct {
type dellSystemConfiguration struct {
XMLName xml.Name `xml:"SystemConfiguration"`
Model string `xml:"Model,attr" json:"Model"`
Comments []string `xml:"Comments>Comment,omitempty" json:"Comments,omitempty" `
Comments []string `xml:"Comments>Comment,omitempty" json:"Comments,omitempty"`
ServiceTag string `xml:"ServiceTag,attr" json:"ServiceTag"`
TimeStamp string `xml:"TimeStamp,attr" json:"TimeStamp"`
Components []*dellComponent `xml:"Component" json:"Components"`
Expand Down Expand Up @@ -115,16 +114,12 @@ func (cm *dellVendorConfig) Marshal() (string, error) {
if err != nil {
return "", err
}

fmt.Printf("x: %s\n", x)
return string(x), nil

Check failure on line 117 in config/dell.go

View workflow job for this annotation

GitHub Actions / lint

return statements should not be cuddled if block has more than two lines (wsl)

Check failure on line 117 in config/dell.go

View workflow job for this annotation

GitHub Actions / lint

return statements should not be cuddled if block has more than two lines (wsl)
case "json":
x, err := json.Marshal(cm.ConfigData.SystemConfiguration)
if err != nil {
return "", err
}

fmt.Printf("x: %s\n", x)
return string(x), nil

Check failure on line 123 in config/dell.go

View workflow job for this annotation

GitHub Actions / lint

return statements should not be cuddled if block has more than two lines (wsl)

Check failure on line 123 in config/dell.go

View workflow job for this annotation

GitHub Actions / lint

return statements should not be cuddled if block has more than two lines (wsl)
default:
return "", UnknownConfigFormatError(strings.ToLower(cm.ConfigFormat))
Expand Down

0 comments on commit 874ca0d

Please sign in to comment.