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 /
internal /
reflectlite /
[ HOME SHELL ]
Name
Size
Permission
Action
all_test.go
24.51
KB
-rw-r--r--
asm.s
199
B
-rw-r--r--
export_test.go
2.96
KB
-rw-r--r--
reflect_mirror_test.go
2.62
KB
-rw-r--r--
set_test.go
2.4
KB
-rw-r--r--
swapper.go
1.93
KB
-rw-r--r--
tostring_test.go
2.42
KB
-rw-r--r--
type.go
23.43
KB
-rw-r--r--
value.go
13.78
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : set_test.go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package reflectlite_test import ( "bytes" "go/ast" "go/token" . "internal/reflectlite" "io" "testing" ) func TestImplicitSetConversion(t *testing.T) { // Assume TestImplicitMapConversion covered the basics. // Just make sure conversions are being applied at all. var r io.Reader b := new(bytes.Buffer) rv := ValueOf(&r).Elem() rv.Set(ValueOf(b)) if r != b { t.Errorf("after Set: r=%T(%v)", r, r) } } var implementsTests = []struct { x interface{} t interface{} b bool }{ {new(*bytes.Buffer), new(io.Reader), true}, {new(bytes.Buffer), new(io.Reader), false}, {new(*bytes.Buffer), new(io.ReaderAt), false}, {new(*ast.Ident), new(ast.Expr), true}, {new(*notAnExpr), new(ast.Expr), false}, {new(*ast.Ident), new(notASTExpr), false}, {new(notASTExpr), new(ast.Expr), false}, {new(ast.Expr), new(notASTExpr), false}, {new(*notAnExpr), new(notASTExpr), true}, {new(mapError), new(error), true}, {new(*mapError), new(error), true}, } type notAnExpr struct{} func (notAnExpr) Pos() token.Pos { return token.NoPos } func (notAnExpr) End() token.Pos { return token.NoPos } func (notAnExpr) exprNode() {} type notASTExpr interface { Pos() token.Pos End() token.Pos exprNode() } type mapError map[string]string func (mapError) Error() string { return "mapError" } var _ error = mapError{} var _ error = new(mapError) func TestImplements(t *testing.T) { for _, tt := range implementsTests { xv := TypeOf(tt.x).Elem() xt := TypeOf(tt.t).Elem() if b := xv.Implements(xt); b != tt.b { t.Errorf("(%s).Implements(%s) = %v, want %v", TypeString(xv), TypeString(xt), b, tt.b) } } } var assignableTests = []struct { x interface{} t interface{} b bool }{ {new(chan int), new(<-chan int), true}, {new(<-chan int), new(chan int), false}, {new(*int), new(IntPtr), true}, {new(IntPtr), new(*int), true}, {new(IntPtr), new(IntPtr1), false}, {new(Ch), new(<-chan interface{}), true}, // test runs implementsTests too } type IntPtr *int type IntPtr1 *int type Ch <-chan interface{} func TestAssignableTo(t *testing.T) { for i, tt := range append(assignableTests, implementsTests...) { xv := TypeOf(tt.x).Elem() xt := TypeOf(tt.t).Elem() if b := xv.AssignableTo(xt); b != tt.b { t.Errorf("%d:AssignableTo: got %v, want %v", i, b, tt.b) } } }
Close