Documentation ¶
Index ¶
- func BaseTypeOf(i interface{}) reflect.Type
- func BaseValue(v reflect.Value) reflect.Value
- func BaseValueOf(i interface{}) reflect.Value
- func Cast[T any](v any) (T, bool)
- func FullyQualifiedName(e interface{}) string
- func IsValueEmpty(val reflect.Value) bool
- func IsValueNil(val reflect.Value) bool
- func Link(src, ptr interface{}) (err error)
- func SymbolicName(e interface{}) string
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseTypeOf ¶
func BaseValueOf ¶
func FullyQualifiedName ¶
func FullyQualifiedName(e interface{}) string
Example ¶
package main import ( "fmt" "github.com/adamluzsi/frameless/pkg/reflectkit" ) func main() { fmt.Println(reflectkit.FullyQualifiedName(Example{})) } type Example struct { Name string }
Output:
func IsValueEmpty ¶
func IsValueNil ¶
func Link ¶
func Link(src, ptr interface{}) (err error)
Link will make destination interface be linked with the src value.
Example ¶
package main import ( "github.com/adamluzsi/frameless/pkg/reflectkit" ) func main() { var src = Example{Name: "Panda"} var dest Example if err := reflectkit.Link(src, &dest); err != nil { // handle err } } type Example struct { Name string }
Output:
func SymbolicName ¶
func SymbolicName(e interface{}) string
Example ¶
package main import ( "fmt" "github.com/adamluzsi/frameless/pkg/reflectkit" ) func main() { fmt.Println(reflectkit.SymbolicName(Example{})) } type Example struct { Name string }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.