title: golang cast a string to net.IPNet type
body: <p>I have a slice of strings that are in CIDR notation.  They are both ipv4 and ipv6 and I need them cast into the type net.IPNet. </p>
  
  <p>How would I do this in golang? </p>
  
  <p>example strings:</p>
  
  <p>192.168.1.1/24<br>
  fd04:3e42:4a4e:3381::/64</p>