I wanna convert url f.e.:
xn--h1aaebtrh5b.xn--p1ai --> кисточки.рф
And of course reverse:
kremlin.ru ---> xn--d1abbgf6aiiy.xn--p1ai
I try use idna package, but i can't import vendor package idna
Link on doc: https://godoc.org/golang.org/x/net/idna#Profile.ToUnicode
Try import:
import "golang_org/x/net/idna"
Get error:
main.go:18:8: cannot find package "golang_org/x/net/idna" in any of:
/usr/local/go/src/golang_org/x/net/idna (from $GOROOT)
/home/arseny/go/src/golang_org/x/net/idna (from $GOPATH)
Another try:
import "vendor/golang_org/x/net/idna"
Errors:
main.go:18:8: must be imported as golang_org/x/net/idna
main.go:19:2: use of vendored package not allowed