mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:06:23 +00:00
utils/ips/dynamic_ip_port: drop unused json/v2 marshaler
The private dynamicIPPort type carried a MarshalJSON method using json/v2. No consumer of DynamicIPPort in the node module relied on the JSON path — the public IPPort/IPDesc types in ip_port.go retain their JSON methods for the external node-info HTTP API. Drop the unused internal marshaler; one path for IP serialization, on the boundary that owns the wire shape.
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
||||
// See the file LICENSE for licensing terms.
|
||||
|
||||
|
||||
package ips
|
||||
|
||||
import (
|
||||
"github.com/go-json-experiment/json"
|
||||
"net"
|
||||
"sync"
|
||||
)
|
||||
@@ -48,10 +46,3 @@ func (i *dynamicIPPort) SetIP(ip net.IP) {
|
||||
|
||||
i.ipPort.IP = ip
|
||||
}
|
||||
|
||||
func (i *dynamicIPPort) MarshalJSON() ([]byte, error) {
|
||||
i.lock.RLock()
|
||||
defer i.lock.RUnlock()
|
||||
|
||||
return json.Marshal(i.ipPort)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user