I found this inspecting the code to understand the test. http://play.golang.org/p/gXdT4o45uw It looks like those methods are assuming that any IP they get is a 16 byte slice, but as far as I know a 4 byte slice is a valid IP.