| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/go/src/cmd/go/testdata/script/ |
Upload File : |
# This test verifies that line numbers are included in module import errors.
# Verifies golang.org/issue/34393.
go list -e -mod=mod -deps -f '{{with .Error}}{{.Pos}}: {{.Err}}{{end}}' ./main
stdout '^bad[/\\]bad.go:3:8: malformed import path "š§.example.com/string": invalid char ''š§''$'
# TODO(#26909): This should include an import stack.
# (Today it includes only a file and line.)
! go build ./main
stderr '^bad[/\\]bad.go:3:8: malformed import path "š§.example.com/string": invalid char ''š§''$'
# TODO(#41688): This should include a file and line, and report the reason for the error..
# (Today it includes only an import stack.)
! go get ./main
stderr '^go: m/main imports\n\tm/bad imports\n\tš§.example.com/string: malformed import path "š§.example.com/string": invalid char ''š§''$'
-- go.mod --
module m
go 1.13
-- main/main.go --
package main
import _ "m/bad"
func main() {}
-- bad/bad.go --
package bad
import _ "š§.example.com/string"