Source File
reflect.go
Belonging Package
go101.org/nstd
package nstd
import (
)
// Type returns a reflect.Type which represents type T,
// which may be either an non-interface type or interface type.
func [ any]() reflect.Type {
var
return ValueOf().Type()
}
// TypeOf returns a reflect.Type which represents the type of v,
// which may be either an non-interface value or interface value.
func [ any]( ) reflect.Type {
return ValueOf().Type()
}
// Value returns a reflect.Value which represents the value v,
// which may be either an non-interface value or interface value.
func [ any]( ) reflect.Value {
// make sure r.CanAddr() and r.CanSet() both always return false,
// even if the passed argument is an interface.
return reflect.ValueOf([1]{}).Index(0)
}
The pages are generated with Golds v0.7.0-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |