Documentation
¶
Index ¶
Constants ¶
View Source
const ThisVar = "c"
ThisVar is used as name for the reference to the converter interface.
Variables ¶
This section is empty.
Functions ¶
func Accessible ¶ added in v1.2.0
Accessible checks if obj is accessible within outputPackagePath.
Types ¶
type Enum ¶ added in v1.4.0
func (Enum) SortedMembers ¶ added in v1.4.0
type FieldSources ¶ added in v0.15.0
type JenID ¶
JenID a jennifer code wrapper with extra infos.
func VariableID ¶
VariableID is used, when the ID can be referenced. F.ex it is not a function call.
type NoMatchError ¶ added in v0.16.0
type NoMatchError struct{ Field string }
func (*NoMatchError) Error ¶ added in v0.16.0
func (err *NoMatchError) Error() string
type Signature ¶
Signature represents a signature for conversion.
func SignatureOf ¶ added in v0.14.0
type SignatureMap ¶ added in v1.9.2
type SignatureMap[T any] struct { // contains filtered or unexported fields }
Implements a hash map with a Signature key. Uses the hash of types.Type via typeutil.
func NewSignatureMap ¶ added in v1.9.2
func NewSignatureMap[T any]() *SignatureMap[T]
func (*SignatureMap[T]) At ¶ added in v1.9.2
func (m *SignatureMap[T]) At(key Signature) (T, bool)
func (*SignatureMap[T]) Set ¶ added in v1.9.2
func (m *SignatureMap[T]) Set(key Signature, value T)
func (*SignatureMap[T]) Values ¶ added in v1.9.2
func (m *SignatureMap[T]) Values() []T
type SimpleStructField ¶ added in v0.15.0
func FindExactField ¶ added in v0.15.0
func FindExactField(source *Type, name string) (*SimpleStructField, error)
type StructField ¶ added in v0.6.0
StructField holds the type of a struct field and its name.
func FindField ¶ added in v0.15.0
func FindField(name string, ignoreCase bool, source *Type, additionalFieldSources []FieldSources) (*StructField, error)
type Type ¶
type Type struct {
String string
T types.Type
Interface bool
InterfaceType *types.Interface
Struct bool
StructType *types.Struct
Named bool
NamedType *types.Named
Pointer bool
PointerType *types.Pointer
PointerInner *Type
List bool
ListFixed bool
ListLen int64
ListInner *Type
Map bool
MapType *types.Map
MapKey *Type
MapValue *Type
Basic bool
BasicType *types.Basic
Signature bool
SignatureType *types.Signature
Func bool
FuncType *types.Func
Chan bool
ChanType *types.Chan
// contains filtered or unexported fields
}
Type is a helper wrapper for types.Type.
func (*Type) AsPointerType ¶ added in v1.2.0
func (*Type) AssignableTo ¶ added in v1.3.0
func (*Type) UnescapedID ¶
UnescapedID returns a deteministically generated id that may be used as variable reserved keywords aren't escaped.
type UsageChecker ¶ added in v1.6.0
type UsageChecker map[string]struct{}
func UsageFromMap ¶ added in v1.6.0
func UsageFromMap[V any](value map[string]V) UsageChecker
func (UsageChecker) Unused ¶ added in v1.6.0
func (u UsageChecker) Unused() []string
func (UsageChecker) Used ¶ added in v1.6.0
func (u UsageChecker) Used(key string)
Click to show internal directories.
Click to hide internal directories.