comandy/ipv6.go

17 lines
277 B
Go
Raw Permalink Normal View History

2024-04-15 17:10:06 +09:00
package main
import (
"net/http"
"github.com/RomiChan/syncx"
)
var canUseIPv6 = syncx.Lazy[bool]{Init: func() bool {
resp, err := http.Get("http://v6.ipv6-test.com/json/widgetdata.php?callback=?")
if err != nil {
return false
}
_ = resp.Body.Close()
return true
}}