Skip to content

Instantly share code, notes, and snippets.

@xquery
Created September 11, 2020 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xquery/b06985c61ddd14cc0cea36952dca1cec to your computer and use it in GitHub Desktop.
Save xquery/b06985c61ddd14cc0cea36952dca1cec to your computer and use it in GitHub Desktop.
it gets weirder
package tstest
import (
"testing"
"net"
)
func TestOpenIPv6(t *testing.T) {
ln, err := net.Listen("tcp6", "[::]:1024")
if err != nil {
t.Error("IPv6 not available")
}
ln.Close()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment