reflects

package
v0.135.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseTypeOf

func BaseTypeOf(i interface{}) reflect.Type

func BaseValueOf

func BaseValueOf(i interface{}) reflect.Value

func Cast added in v0.93.0

func Cast[T any](v any) (T, bool)

func FullyQualifiedName

func FullyQualifiedName(e interface{}) string
Example
package main

import (
	"fmt"

	"github.com/adamluzsi/frameless/pkg/reflects"
)

func main() {
	fmt.Println(reflects.FullyQualifiedName(any(nil)))
}
Output:

func IsValueEmpty

func IsValueEmpty(val reflect.Value) bool

func IsValueNil added in v0.116.0

func IsValueNil(val reflect.Value) bool
func Link(src, ptr interface{}) (err error)

Link will make destination interface be linked with the src value.

func SymbolicName

func SymbolicName(e interface{}) string
Example
package main

import (
	"github.com/adamluzsi/frameless/pkg/reflects"
)

func main() {
	type T struct{}
	name := reflects.SymbolicName(T{})
	_ = name
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL