Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
pappz committed Sep 10, 2024
1 parent d199f36 commit 2a9c174
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
10 changes: 0 additions & 10 deletions relay/messages/address/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,3 @@ func (addr *Address) Marshal() ([]byte, error) {
}
return buf.Bytes(), nil
}

func Unmarshal(data []byte) (*Address, error) {
var addr Address
buf := bytes.NewBuffer(data)
dec := gob.NewDecoder(buf)
if err := dec.Decode(&addr); err != nil {
return nil, fmt.Errorf("decode Address: %w", err)
}
return &addr, nil
}
9 changes: 0 additions & 9 deletions relay/messages/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ type Msg struct {
AdditionalData []byte
}

func (msg *Msg) Marshal() ([]byte, error) {
var buf bytes.Buffer
enc := gob.NewEncoder(&buf)
if err := enc.Encode(msg); err != nil {
return nil, fmt.Errorf("encode Msg: %w", err)
}
return buf.Bytes(), nil
}

func UnmarshalMsg(data []byte) (*Msg, error) {
var msg *Msg

Expand Down

0 comments on commit 2a9c174

Please sign in to comment.