Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
cmd /
go /
internal /
load /
[ HOME SHELL ]
Name
Size
Permission
Action
flag.go
2.62
KB
-rw-r--r--
flag_test.go
3.92
KB
-rw-r--r--
path.go
374
B
-rw-r--r--
pkg.go
75.18
KB
-rw-r--r--
pkg_test.go
2.24
KB
-rw-r--r--
search.go
1.68
KB
-rw-r--r--
test.go
20.86
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : pkg_test.go
package load import ( "cmd/go/internal/cfg" "testing" ) func TestPkgDefaultExecName(t *testing.T) { oldModulesEnabled := cfg.ModulesEnabled defer func() { cfg.ModulesEnabled = oldModulesEnabled }() for _, tt := range []struct { in string files []string wantMod string wantGopath string }{ {"example.com/mycmd", []string{}, "mycmd", "mycmd"}, {"example.com/mycmd/v0", []string{}, "v0", "v0"}, {"example.com/mycmd/v1", []string{}, "v1", "v1"}, {"example.com/mycmd/v2", []string{}, "mycmd", "v2"}, // Semantic import versioning, use second last element in module mode. {"example.com/mycmd/v3", []string{}, "mycmd", "v3"}, // Semantic import versioning, use second last element in module mode. {"mycmd", []string{}, "mycmd", "mycmd"}, {"mycmd/v0", []string{}, "v0", "v0"}, {"mycmd/v1", []string{}, "v1", "v1"}, {"mycmd/v2", []string{}, "mycmd", "v2"}, // Semantic import versioning, use second last element in module mode. {"v0", []string{}, "v0", "v0"}, {"v1", []string{}, "v1", "v1"}, {"v2", []string{}, "v2", "v2"}, {"command-line-arguments", []string{"output.go", "foo.go"}, "output", "output"}, } { { cfg.ModulesEnabled = true pkg := new(Package) pkg.ImportPath = tt.in pkg.GoFiles = tt.files pkg.Internal.CmdlineFiles = len(tt.files) > 0 gotMod := pkg.DefaultExecName() if gotMod != tt.wantMod { t.Errorf("pkg.DefaultExecName with ImportPath = %q in module mode = %v; want %v", tt.in, gotMod, tt.wantMod) } } { cfg.ModulesEnabled = false pkg := new(Package) pkg.ImportPath = tt.in pkg.GoFiles = tt.files pkg.Internal.CmdlineFiles = len(tt.files) > 0 gotGopath := pkg.DefaultExecName() if gotGopath != tt.wantGopath { t.Errorf("pkg.DefaultExecName with ImportPath = %q in gopath mode = %v; want %v", tt.in, gotGopath, tt.wantGopath) } } } } func TestIsVersionElement(t *testing.T) { t.Parallel() for _, tt := range []struct { in string want bool }{ {"v0", false}, {"v05", false}, {"v1", false}, {"v2", true}, {"v3", true}, {"v9", true}, {"v10", true}, {"v11", true}, {"v", false}, {"vx", false}, } { got := isVersionElement(tt.in) if got != tt.want { t.Errorf("isVersionElement(%q) = %v; want %v", tt.in, got, tt.want) } } }
Close