Seems to work fine on a Pi. Here's the same code running under Windows:
c:\repo\src>go run mdns.go
2020/03/31 16:21:23 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: not supported by windows
2020/03/31 16:21:24 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:52447: use of closed network connection
Seems to work fine on a Pi. Here's the same code running under Windows:
c:\repo\src>go run mdns.go
2020/03/31 16:21:23 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: not supported by windows
2020/03/31 16:21:24 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:52447: use of closed network connection