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 :  /lib/go/src/cmd/go/testdata/script/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/go/src/cmd/go/testdata/script/dist_list_missing.txt
# Regression test for #60939: when 'go tool dist' is missing,
# 'go tool dist list' should inject its output.


# Set GOROOT to a directory that definitely does not include
# a compiled 'dist' tool. 'go tool dist list' should still
# work, because 'cmd/go' itself can impersonate this command.

mkdir $WORK/goroot/bin
mkdir $WORK/goroot/pkg/tool/${GOOS}_${GOARCH}
env GOROOT=$WORK/goroot

! go tool -n dist
stderr 'go: no such tool "dist"'

go tool dist list
stdout linux/amd64
cp stdout tool.txt

go tool dist list -v
stdout linux/amd64
cp stdout tool-v.txt

go tool dist list -broken
stdout $GOOS/$GOARCH
cp stdout tool-broken.txt

go tool dist list -json
stdout '"GOOS": "linux",\n\s*"GOARCH": "amd64",\n'
cp stdout tool-json.txt

go tool dist list -json -broken
stdout '"GOOS": "'$GOOS'",\n\s*"GOARCH": "'$GOARCH'",\n'
cp stdout tool-json-broken.txt

[short] stop


# Check against the real cmd/dist as the source of truth.

env GOROOT=$TESTGO_GOROOT
go build -o dist.exe cmd/dist

exec ./dist.exe list
cmp stdout tool.txt

exec ./dist.exe list -v
cmp stdout tool-v.txt

exec ./dist.exe list -broken
cmp stdout tool-broken.txt

exec ./dist.exe list -json
cmp stdout tool-json.txt

exec ./dist.exe list -json -broken
cmp stdout tool-json-broken.txt

Youez - 2016 - github.com/yon3zu
LinuXploit