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/ |
# Test 'go get' with a local module with a name that is not valid for network lookup. [short] skip env GO111MODULE=on go mod edit -fmt cp go.mod go.mod.orig # 'go get -u' within the main module should work, even if it has a local-only name. cp go.mod.orig go.mod go get -u ./... grep 'rsc.io/quote.*v1.5.2' go.mod grep 'golang.org/x/text.*v0.3.0' go.mod cp go.mod go.mod.implicitmod # 'go get -u local/...' should be equivalent to 'go get -u ./...' # (assuming no nested modules) cp go.mod.orig go.mod go get -u local/... cmp go.mod go.mod.implicitmod # For the main module, @patch should be a no-op. cp go.mod.orig go.mod go get -u local/...@patch cmp go.mod go.mod.implicitmod # 'go get -u' in the empty root of the main module should fail. # 'go get -u .' should also fail. cp go.mod.orig go.mod ! go get -u ! go get -u . # 'go get -u .' within a package in the main module updates the dependencies # of that package. cp go.mod.orig go.mod cd uselang go get -u . cd .. grep 'rsc.io/quote.*v1.3.0' go.mod grep 'golang.org/x/text.*v0.3.0' go.mod cp go.mod go.mod.dotpkg # 'go get -u' with an explicit package in the main module updates the # dependencies of that package. cp go.mod.orig go.mod go get -u local/uselang cmp go.mod go.mod.dotpkg -- go.mod -- module local require ( golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c rsc.io/quote v1.3.0 ) -- uselang/uselang.go -- package uselang import _ "golang.org/x/text/language" -- usequote/usequote.go -- package usequote import _ "rsc.io/quote"