forked from TrueCloudLab/distribution
Changed snake case naming to camelCase
Signed-off-by: Peter Choi <phkchoi89@gmail.com>
This commit is contained in:
parent
eff5278d12
commit
b085d5556e
2 changed files with 7 additions and 7 deletions
|
@ -60,10 +60,10 @@ func (ipnet *netIPNet) MarshalJSON() ([]byte, error) {
|
|||
}
|
||||
|
||||
func (ipnet *netIPNet) UnmarshalJSON(b []byte) (err error) {
|
||||
var ipnet_str string
|
||||
if err = json.Unmarshal(b, &ipnet_str); err == nil {
|
||||
var ipnetStr string
|
||||
if err = json.Unmarshal(b, &ipnetStr); err == nil {
|
||||
var cidr *net.IPNet
|
||||
if _, cidr, err = net.ParseCIDR(ipnet_str); err == nil {
|
||||
if _, cidr, err = net.ParseCIDR(ipnetStr); err == nil {
|
||||
*ipnet = netIPNet(*cidr)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue