gocql/gocql — pull request #244 by dankennedy (2014-09-15 20:15:29+00:00)
Title: Change marshalling of inet addresses to restrict them to either 4 or 16 bytes

If the default byte array, backing net.IP structs is used, values are written to the database with all bytes regardless (which is understandable). What this means however is that while records can be written and read with the gocql library instead of being persisted as 127.0.0.1 for example it is persisted as ::ffff:127.0.0.1 which means any comparison in WHERE clauses will not return rows even though some clients (datastax) show them as looking the same in their IDE. This change writes either 4 byte/IPv4 or 16 byte/IPv6 representations without the extra bytes when not required. This maintains the comparison check as well as the marshalling consistency.