Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux in-mum-web1333.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64
User : u141265441 ( 141265441)
PHP Version : 8.4.3
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Directory :  /proc/self/root/opt/golang/1.22.0/src/cmd/go/testdata/script/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/opt/golang/1.22.0/src/cmd/go/testdata/script/mod_get_ambiguous_import.txt
go list -m all
stdout '^example.net/m v0.1.0 '
! stdout '^example.net/m/p '
cp go.mod go.mod.orig

# Upgrading example.net/m/p without also upgrading example.net/m
# causes the import of package example.net/m/p to be ambiguous.
#
# TODO(#27899): Should we automatically upgrade example.net/m to v0.2.0
# to resolve the conflict?
! go get example.net/m/p@v1.0.0
stderr '^go: example.net/m/p: ambiguous import: found package example.net/m/p in multiple modules:\n\texample.net/m v0.1.0 \(.*[/\\]m1[/\\]p\)\n\texample.net/m/p v1.0.0 \(.*[/\\]p0\)\n\z'
cmp go.mod go.mod.orig

# Upgrading both modules simultaneously resolves the ambiguous upgrade.
# Note that this command line mixes a module path (example.net/m)
# and a package path (example.net/m/p) in the same command.
go get example.net/m@v0.2.0 example.net/m/p@v1.0.0

go list -m all
stdout '^example.net/m v0.2.0 '
stdout '^example.net/m/p v1.0.0 '

-- go.mod --
module example.net/importer

go 1.16

require (
	example.net/m v0.1.0
)

replace (
	example.net/m v0.1.0 => ./m1
	example.net/m v0.2.0 => ./m2
	example.net/m/p v1.0.0 => ./p0
)
-- importer.go --
package importer
import _ "example.net/m/p"
-- m1/go.mod --
module example.net/m

go 1.16
-- m1/p/p.go --
package p
-- m2/go.mod --
module example.net/m

go 1.16
-- m2/README.txt --
Package p has been moved to module …/m/p.
Module …/m/p does not require any version of module …/m.

-- p0/go.mod --
module example.net/m/p

go 1.16
-- p0/p.go --
package p

Al-HUWAITI Shell