Skip to content

Commit

Permalink
fix(serializer): remove dead code
Browse files Browse the repository at this point in the history
This code is not used.
  • Loading branch information
cpaillet committed Jun 18, 2024
1 parent 4379f3c commit 01b6cc5
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions internal/convertor/device/serializer.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package device

import (
"bytes"
"encoding/json"
"errors"

Expand Down Expand Up @@ -94,18 +93,12 @@ func (s *SafeRepository) GetDeviceOpenConfigJSON(hostname string) ([]byte, error

var config json.RawMessage
var err error
out := bytes.NewBuffer(nil)

if config, err = dev.GetCompactJSON(); err != nil {
log.Error().Err(err).Send()
return []byte(emptyJSON), err
}

if err := json.Compact(out, []byte(dev.Config.JSON)); err != nil {
log.Error().Err(err).Send()
return []byte(emptyJSON), err
}

if r, err := json.Marshal(config); err != nil {
log.Error().Err(err).Send()
return []byte(emptyJSON), err
Expand Down

0 comments on commit 01b6cc5

Please sign in to comment.