types

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPointer

func IsPointer(typ Type) bool

func IsUnknown

func IsUnknown(info Info) bool

Types

type Array

type Array struct {
	Elem Type
}

func (Array) String

func (c Array) String() string

func (Array) Underlying

func (c Array) Underlying() UnderlyingType

type Basic

type Basic string

func (Basic) String

func (c Basic) String() string

func (Basic) Underlying

func (c Basic) Underlying() UnderlyingType

type Chan

type Chan struct {
	Elem Type
}

func (Chan) String

func (c Chan) String() string

func (Chan) Underlying

func (c Chan) Underlying() UnderlyingType

type GenericInstanceType added in v1.1.2

type GenericInstanceType struct {
	Type           Type // point to a NamedType
	InstanceParams []Type
}

func (GenericInstanceType) String added in v1.1.2

func (c GenericInstanceType) String() string

func (GenericInstanceType) Underlying added in v1.1.2

func (c GenericInstanceType) Underlying() UnderlyingType

type ImportPath

type ImportPath string

func (ImportPath) String

func (c ImportPath) String() string

func (ImportPath) Underlying

func (c ImportPath) Underlying() UnderlyingType

type Info

type Info interface {
	// contains filtered or unexported methods
}

type Interface

type Interface struct {
}

func (Interface) String

func (c Interface) String() string

func (Interface) Underlying

func (c Interface) Underlying() UnderlyingType

type Lazy

type Lazy func() Info

func (Lazy) String

func (c Lazy) String() string

type LazyType

type LazyType func() Type

LazyType will be resolved when UseContext.doUseTypeInFile is called that will recursively resolve the lazy type

func (LazyType) String

func (c LazyType) String() string

func (LazyType) Underlying

func (c LazyType) Underlying() UnderlyingType

type Literal

type Literal struct {
	Type_ Type
}

func (Literal) String

func (c Literal) String() string

func (Literal) Type

func (c Literal) Type() Type

type Map

type Map struct {
	Key   Type
	Value Type
}

func (Map) String

func (c Map) String() string

func (Map) Underlying

func (c Map) Underlying() UnderlyingType

type NamedType

type NamedType struct {
	PkgPath string
	Name    string
	Type    Type
}

func ResolveAlias

func ResolveAlias(typ NamedType) NamedType

func (NamedType) String

func (c NamedType) String() string

func (NamedType) Underlying

func (c NamedType) Underlying() UnderlyingType

type Object

type Object interface {
	Info

	String() string
	Type() Type
	// contains filtered or unexported methods
}

Object represents type or an object

type Operation

type Operation interface {
	Info
	// contains filtered or unexported methods
}

type OperationName

type OperationName string

func (OperationName) String

func (c OperationName) String() string

type PkgFunc

type PkgFunc struct {
	PkgPath   string
	Name      string
	Signature Signature
}

package level function

func (PkgFunc) String

func (c PkgFunc) String() string

func (PkgFunc) Type

func (c PkgFunc) Type() Type

type PkgTypeMethod

type PkgTypeMethod struct {
	Name      string
	Recv      Type
	Signature Signature
}

package level method

func (PkgTypeMethod) String

func (c PkgTypeMethod) String() string

func (PkgTypeMethod) Type

func (c PkgTypeMethod) Type() Type

type PkgVariable

type PkgVariable struct {
	PkgPath string
	Name    string
	Type_   Type
}

package level variable

func (PkgVariable) String

func (c PkgVariable) String() string

func (PkgVariable) Type

func (c PkgVariable) Type() Type

type Pointer

type Pointer struct {
	Value Object
}

func (Pointer) String

func (c Pointer) String() string

func (Pointer) Type

func (c Pointer) Type() Type

type PtrType

type PtrType struct {
	Elem Type
}

func (PtrType) String

func (c PtrType) String() string

func (PtrType) Underlying

func (c PtrType) Underlying() UnderlyingType

type RawPtr

type RawPtr struct {
	Elem UnderlyingType
}

func (RawPtr) String

func (c RawPtr) String() string

func (RawPtr) Underlying

func (c RawPtr) Underlying() UnderlyingType

type ScopeVariable

type ScopeVariable struct {
	Value Object
}

func (ScopeVariable) String

func (c ScopeVariable) String() string

func (ScopeVariable) Type

func (c ScopeVariable) Type() Type

type Signature

type Signature struct {
	// Params  []Type // don't need it for now
	Results []Type
}

func (Signature) String

func (c Signature) String() string

func (Signature) Underlying

func (c Signature) Underlying() UnderlyingType

type Slice

type Slice struct {
	Elem Type
}

func (Slice) String

func (c Slice) String() string

func (Slice) Underlying

func (c Slice) Underlying() UnderlyingType

type Struct

type Struct struct {
	Fields []StructField
}

func (Struct) String

func (c Struct) String() string

func (Struct) Underlying

func (c Struct) Underlying() UnderlyingType

type StructField

type StructField struct {
	Name string
	Type Type
}

type Tuple

type Tuple []Type

func (Tuple) String

func (c Tuple) String() string

func (Tuple) Type

func (c Tuple) Type() Type

func (Tuple) Underlying

func (c Tuple) Underlying() UnderlyingType

type TupleValue

type TupleValue []Object

func (TupleValue) String

func (c TupleValue) String() string

func (TupleValue) Type

func (c TupleValue) Type() Type

type Type

type Type interface {
	Info
	String() string
	Underlying() UnderlyingType
	// contains filtered or unexported methods
}

func ResolveLazy

func ResolveLazy(typ Type) Type

type UnderlyingType

type UnderlyingType interface {
	Type
	// contains filtered or unexported methods
}

type Unknown

type Unknown struct{}

func (Unknown) String

func (c Unknown) String() string

func (Unknown) Type

func (c Unknown) Type() Type

func (Unknown) Underlying

func (c Unknown) Underlying() UnderlyingType

type Untyped

type Untyped struct{}

func (Untyped) String

func (c Untyped) String() string

func (Untyped) Underlying

func (c Untyped) Underlying() UnderlyingType

type UntypedLiteral added in v1.1.4

type UntypedLiteral struct {
	Type_ Type
}

e.g. 10

func (UntypedLiteral) String added in v1.1.4

func (c UntypedLiteral) String() string

func (UntypedLiteral) Type added in v1.1.4

func (c UntypedLiteral) Type() Type

type UntypedNil

type UntypedNil struct {
}

func (UntypedNil) String

func (c UntypedNil) String() string

func (UntypedNil) Type

func (c UntypedNil) Type() Type

type Value

type Value struct {
	Type_ Type
}

func (Value) String

func (c Value) String() string

func (Value) Type

func (c Value) Type() Type

Jump to

Keyboard shortcuts

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