# Issue #75251: Don't panic if the package path or the package version
# contains invalid UTF-8 characters.

go mod init m

! go get golang.org/x/net/http/httpgutsv0.43.0 # contains 0xff byte
! stderr panic
stderr 'malformed module path'

! go get golang.org/x/net/http/httpguts@v0.43.0 # contains 0xff byte
! stderr panic
stderr 'malformed module path'

! go get golang.org/x/net/http/httpguts@v0.43.0 # contains 0xff byte
! stderr panic
stderr 'disallowed version string'
