forked from TrueCloudLab/frostfs-node
[#607] network: Do not work with Address pointers
`network.Address` structure in most cases created once and used read-only. Replace `AddressFromString` function with `Address.FromString` method with the same purpose and implementation. Make all libraries to work with value. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
5de074f24c
commit
adbbad0beb
35 changed files with 128 additions and 97 deletions
|
@ -90,7 +90,7 @@ type cfg struct {
|
|||
|
||||
cfgNodeInfo cfgNodeInfo
|
||||
|
||||
localAddr *network.Address
|
||||
localAddr network.Address
|
||||
|
||||
cfgObject cfgObject
|
||||
|
||||
|
@ -308,7 +308,7 @@ func initCfg(path string) *cfg {
|
|||
return c
|
||||
}
|
||||
|
||||
func (c *cfg) LocalAddress() *network.Address {
|
||||
func (c *cfg) LocalAddress() network.Address {
|
||||
return c.localAddr
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue