A Go wrapper for libunbound
Branch: master
Clone or download
miekg Fix macro duplication
../../miekg/unbound/unbound.go:37:0: warning: "offsetof" redefined
 #define offsetof(type, member)  __builtin_offsetof (type, member)

In file included from /usr/include/_G_config.h:15:0,
                 from /usr/include/libio.h:31,
                 from /usr/include/stdio.h:74,
                 from ../../miekg/unbound/unbound.go:35:
/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h:417:0: note: this is the location of the previous definition
 #define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)

Guard it with ifndef
Latest commit e2b53b2 Apr 19, 2018



A wrapper for Unbound in Go.

Unbound's ub_result has been extended with an slice of dns.RRs, this alleviates the need to parse ub_result.data yourself.

The website for Unbound is https://unbound.net/, where you can find further documentation.

Tested/compiled to work for versions: 1.4.22 and 1.6.0-3+deb9u1 (Debian Stretch).

Note: using cgo means the executables will use shared libraries (OpenSSL, ldns and libunbound).

The tutorials found here are the originals ones adapted to Go.