errMsg:=fmt.Errorf("Service annotation %s:%s is not valid. Expecting source IP ranges. Comma Seperated. For example, 0.0.0.0/0,192.168.2.0/24",gceLBAllowSourceRange,val)
ranges:=strings.Split(val,",")
iflen(ranges)<=0{
returnerrMsg
}
for_,subnet:=rangeranges{
_,_,err:=net.ParseCIDR(subnet)
iferr!=nil{
returnerrMsg
}
}
returnnil
}
// GCECloud is an implementation of Interface, LoadBalancer and Instances for Google Compute Engine.