title: Golang: Number of bits of an IP mask
body: <p>In Go, how do I get the number of bits of an IP mask like this: <code>10.100.20.0 255.255.255.0</code> => <code>24</code> bits maks.</p>
  
  <p>It would be helpful to check if a mask is lower or greater than a certain number of bits (like if one wants to block all adresses greater than /24).</p>