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_import_vendor.txt
# For 1.23+, vendored packages that are missing in modules.txt should result in an error.
cp incorrect_modules.txt vendor/modules.txt
# incorrect_modules is missing foo.com/internal/bar/b so the build should fail.
! go build ./vendor/foo.com/internal/bar/a
stderr 'cannot find module providing package foo.com/internal/bar/b: import lookup disabled by -mod=vendor'
stderr 'go: ignoring package foo.com/internal/bar/b which exists in the vendor directory but is missing from vendor/modules.txt. To sync the vendor directory run go mod vendor.'

cp correct_modules.txt vendor/modules.txt
go build ./vendor/foo.com/internal/bar/a

# For go versions < 1.23, vendored packages that are missing in modules.txt should not result in an error.
cp 122go.mod go.mod

cp incorrect_modules.txt vendor/modules.txt

# go version < 1.23 and incorrect_modules is missing foo.com/internal/bar/b so the build should not fail
go build ./vendor/foo.com/internal/bar/a

cp correct_modules.txt vendor/modules.txt
go build ./vendor/foo.com/internal/bar/a

-- 122go.mod --
module example.com/x
go 1.22

require "foo.com/internal/bar" v1.0.0

-- go.mod --
module example.com/x
go 1.23

require "foo.com/internal/bar" v1.0.0

-- incorrect_modules.txt --
# foo.com/internal/bar v1.0.0
## explicit
foo.com/internal/bar/a

-- correct_modules.txt --
# foo.com/internal/bar v1.0.0
## explicit
foo.com/internal/bar/a
foo.com/internal/bar/b

-- vendor/foo.com/internal/bar/a/a.go --
package a
import _ "foo.com/internal/bar/b"

-- vendor/foo.com/internal/bar/b/b.go --
package b

Youez - 2016 - github.com/yon3zu
LinuXploit