Remove duplicate call to net.ParseIP
and a little cleanup
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 292e38a144
Component: cli
This commit is contained in:
committed by
Vincent Demeester
parent
290c7f1a1b
commit
74a2061e32
@@ -22,10 +22,10 @@ func (o *IpOpt) Set(val string) error {
|
||||
if ip == nil {
|
||||
return fmt.Errorf("%s is not an ip address", val)
|
||||
}
|
||||
(*o.IP) = net.ParseIP(val)
|
||||
*o.IP = ip
|
||||
return nil
|
||||
}
|
||||
|
||||
func (o *IpOpt) String() string {
|
||||
return (*o.IP).String()
|
||||
return o.IP.String()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user