refl

package
v0.6.28 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package refl provides reflection helpers.

Deprecated: use github.com/swaggest/refl.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepIndirect

func DeepIndirect(t reflect.Type) reflect.Type

DeepIndirect returns first encountered non-ptr.

func FindEmbeddedSliceOrMap added in v0.6.14

func FindEmbeddedSliceOrMap(i interface{}) reflect.Type

FindEmbeddedSliceOrMap checks if variable has a slice/array/map or a pointer to it embedded.

func GoType

func GoType(t reflect.Type) string

GoType returns string representation of type name including import path.

func HasTaggedFields

func HasTaggedFields(i interface{}, tagname string) bool

HasTaggedFields checks if the structure has fields with tag name.

func IsSliceOrMap

func IsSliceOrMap(i interface{}) bool

IsSliceOrMap checks if variable is a slice/array/map or a pointer to it.

func IsStruct

func IsStruct(i interface{}) bool

IsStruct checks if variable is a struct or a pointer to a struct.

Types

This section is empty.

Jump to

Keyboard shortcuts

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