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/list_constraints.txt
# Check that files and their imports are not included in 'go list' output
# when they are excluded by build constraints.

# Linux and cgo files should be included when building in that configuration.
env GOOS=linux
env GOARCH=amd64
env CGO_ENABLED=1
go list -f '{{range .GoFiles}}{{.}} {{end}}'
stdout '^cgotag.go empty.go suffix_linux.go tag.go $'
go list -f '{{range .CgoFiles}}{{.}} {{end}}'
stdout '^cgoimport.go $'
go list -f '{{range .Imports}}{{.}} {{end}}'
stdout '^C cgoimport cgotag suffix tag $'

# Disabling cgo should exclude cgo files and their imports.
env CGO_ENABLED=0
go list -f '{{range .GoFiles}}{{.}} {{end}}'
stdout 'empty.go suffix_linux.go tag.go'
go list -f '{{range .CgoFiles}}{{.}} {{end}}'
! stdout .
go list -f '{{range .Imports}}{{.}} {{end}}'
stdout '^suffix tag $'

# Changing OS should exclude linux sources.
env GOOS=darwin
go list -f '{{range .GoFiles}}{{.}} {{end}}'
stdout '^empty.go $'
go list -f '{{range .Imports}}{{.}} {{end}}'
stdout '^$'

# Enabling a tag should include files that require it.
go list -tags=extra -f '{{range .GoFiles}}{{.}} {{end}}'
stdout '^empty.go extra.go $'
go list -tags=extra -f '{{range .Imports}}{{.}} {{end}}'
stdout '^extra $'

# Packages that require a tag should not be listed unless the tag is on.
! go list ./tagonly
go list -tags=extra ./tagonly
stdout m/tagonly

-- go.mod --
module m

go 1.13

-- empty.go --
package p

-- extra.go --
// +build extra

package p

import _ "extra"

-- suffix_linux.go --
package p

import _ "suffix"

-- tag.go --
// +build linux

package p

import _ "tag"

-- cgotag.go --
// +build cgo

package p

import _ "cgotag"

-- cgoimport.go --
package p

import "C"

import _ "cgoimport"

-- tagonly/tagonly.go --
// +build extra

package tagonly

Youez - 2016 - github.com/yon3zu
LinuXploit