Skip to content

Commit

Permalink
feat: support for decoding IPv6 addresses (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwimmer authored Dec 16, 2021
1 parent d04642a commit 9e3b6d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions typeddata/typeddata.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ func Decode(buf []byte) (data interface{}, n int, err error) {
n += 4
return

case TypeIPv6:
data = net.IP(buf[:16])
n += 16
return

case TypeString:
sLen, i := varint.Uvarint(buf)
n += i
Expand Down

0 comments on commit 9e3b6d6

Please sign in to comment.