Skip to content

Commit

Permalink
change method signature for MarshalBinary (no pointer)
Browse files Browse the repository at this point in the history
  • Loading branch information
severindellsperger committed Jun 20, 2024
1 parent c73aef9 commit 89baa5f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/arango/document-types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type LsNode struct {
message.LSNode
}

func (node *LsNode) MarshalBinary() ([]byte, error) {
func (node LsNode) MarshalBinary() ([]byte, error) {
return json.Marshal(node)
}

Expand All @@ -25,23 +25,23 @@ type LsLink struct {
NormalizedUnidirPacketLoss float64 `json:"normalized_unidir_packet_loss,omitempty"`
}

func (link *LsLink) MarshalBinary() ([]byte, error) {
func (link LsLink) MarshalBinary() ([]byte, error) {
return json.Marshal(link)
}

type LsPrefix struct {
message.LSPrefix
}

func (prefix *LsPrefix) MarshalBinary() ([]byte, error) {
func (prefix LsPrefix) MarshalBinary() ([]byte, error) {
return json.Marshal(prefix)
}

type LsSrv6Sid struct {
message.LSSRv6SID
}

func (srv6sid *LsSrv6Sid) MarshalBinary() ([]byte, error) {
func (srv6sid LsSrv6Sid) MarshalBinary() ([]byte, error) {
return json.Marshal(srv6sid)
}

Expand All @@ -53,7 +53,7 @@ type LsNodeEdge struct {
Link string `json:"link,omitempty"`
}

func (edge *LsNodeEdge) MarshalBinary() ([]byte, error) {
func (edge LsNodeEdge) MarshalBinary() ([]byte, error) {
return json.Marshal(edge)
}

Expand All @@ -65,6 +65,6 @@ type LsNodeCoordinates struct {
Longitude float64 `json:"longitude,omitempty"`
}

func (coordinates *LsNodeCoordinates) MarshalBinary() ([]byte, error) {
func (coordinates LsNodeCoordinates) MarshalBinary() ([]byte, error) {
return json.Marshal(coordinates)
}

0 comments on commit 89baa5f

Please sign in to comment.