I was getting the multiple definition error when I put my C files in the
same directory as my go files.
Only after reading some online posts I figured I should put my code into a
separate directory.
The introductory page to cgo doesn't mention this. It would save newbies
some time if did:
https
I need to call some C functions from Go. I think I know how to proceed
using cgo.
However, I was wondering how goroutines and blocking calls in the C
functions work together.
So in the below example (pseudocode) will the goroutine be suspended when
the pthread_lock call is waiting to acquire the
Thanks Dave. I am aware of that repo but it doesn't provide an abstraction
of the resolver functionality.
I found https://github.com/bogdanovich/dns_resolver which is written using
miekg/dns. It is lacking some of the options that libraries like c-ares
have (using TCP and controlling timeout).
I
Hello,
I would like to control the dns lookup timeout, the number of retries and
also the ability to use TCP for the DNS resolution.
I am from the C/C++ world and c-ares has options to control these.
I am not findiing either of these as options in the go net package.
Am I not looking in the right