Documentation ¶
Overview ¶
Package preflect obtains underlying type using reflection
Index ¶
Constants ¶
View Source
const (
Nil = "nil"
)
Variables ¶
This section is empty.
Functions ¶
func FuncName ¶ added in v0.4.174
func FuncName(funcOrMethod any) (cL *pruntime.CodeLocation, err error)
FuncName returns information on a function value
- funcOrMethod: non-nil function value such as:
- — a top-level function: “func main() {”
- — a method: “errors.New("").Error”
- — an anonymous function: “var f = func() {}” returned like “SomeFunc.func1”
- cL is a function-describing structure of basic types only
- — pruntime.CodeLocation.FuncIdentifier returns the function name identifier, a single word
- error is returned if:
- — funcOrMethod is nil or not a function value
- — function value retrieval failed in runtime
func IntValue ¶
IntValue returns the integer value of value
- hasValue is true and u64 is initialized for any integer, pointer or nil
- for signed integer types, isSigned is true and i64 has value
- isPointer indicates that u64 holds a pointer value
- nil returns: u64 = 0, hasValue true, isPointer true, isSigned false
- superseded by non-reflection version github.com/haraldrudell/parl/ints.IntProperties
func PredeclaredType ¶
PredeclaredType returns a string describing the underlying type of value
- examples: "bool" "uint8" "int(64)"
- no named types or type aliases
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.