Skip to content

Commit

Permalink
Fix golangci-lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
iwysiu committed Sep 18, 2024
1 parent 4a3bdbe commit fdd3235
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/models/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type AWSSiteWiseDataSourceSetting struct {
}

func (s *AWSSiteWiseDataSourceSetting) Load(config backend.DataSourceInstanceSettings) error {
if config.JSONData != nil && len(config.JSONData) > 1 {
if len(config.JSONData) > 1 {
if err := json.Unmarshal(config.JSONData, s); err != nil {
return fmt.Errorf("could not unmarshal DatasourceSettings json: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/sitewise/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (a *EdgeAuthenticator) Authenticate() (models.AuthInfo, error) {
for i, asn1Data := range rawCerts {
cert, err := x509.ParseCertificate(asn1Data)
if err != nil {
return fmt.Errorf("tls: failed to parse certificate from server: " + err.Error())
return fmt.Errorf("tls: failed to parse certificate from server: %w", err)
}
certs[i] = cert
}
Expand Down

0 comments on commit fdd3235

Please sign in to comment.