package
1.22.2
Repository: https://github.com/go-asm/go.git
Documentation: pkg.go.dev

# Functions

If t is a pointer, AsPointer returns that type, otherwise it returns nil.
AssertableTo reports whether a value of type V can be asserted to have type T.
AssignableTo reports whether a value of type V is assignable to a variable of type T.
If t is a signature, AsSignature returns that type, otherwise it returns nil.
Comparable reports whether values of type T are comparable.
ConvertibleTo reports whether a value of type V is convertible to a value of type T.
If typ is a type parameter, CoreType returns the single underlying type of all types in the corresponding type constraint if it exists, or nil otherwise.
Default returns the default "typed" type for an "untyped" type; it returns the incoming type for all other types.
DefPredeclaredTestFuncs defines the assert and trace built-ins.
Id returns name if it is exported, otherwise it returns the name qualified with the package path.
Identical reports whether x and y are identical types.
IdenticalIgnoreTags reports whether x and y are identical types if tags are ignored.
Implements reports whether type V implements interface T.
Instantiate instantiates the type orig with the given type arguments targs.
IsInterface reports whether t is an interface type.
No description provided by the author
LookupFieldOrMethod looks up a field or method with given package and name in T and returns the corresponding *Var or *Func, an index sequence, and a bool indicating if there were any pointer indirections on the path to the field or method.
MissingMethod returns (nil, false) if V implements T, otherwise it returns a missing method required by T and whether it is missing or just has the wrong type: either a pointer receiver or wrong signature.
NewAlias creates a new Alias type with the given type name and rhs.
NewArray returns a new array type for the given element type and length.
NewChan returns a new channel type for the given direction and element type.
NewChecker returns a new Checker instance for a given package.
NewConst returns a new constant with value val.
NewContext creates a new Context.
NewField returns a new variable representing a struct field.
NewFunc returns a new function with the given signature, representing the function's type.
NewInterfaceType returns a new interface for the given methods and embedded types.
NewLabel returns a new label.
NewMap returns a new map for the given key and element types.
NewNamed returns a new named type for the given type name, underlying type, and associated methods.
NewPackage returns a new Package for the given package path and name.
NewParam returns a new variable representing a function parameter.
NewPkgName returns a new PkgName object representing an imported package.
NewPointer returns a new pointer type for the given element (base) type.
NewScope returns a new, empty scope contained in the given parent scope, if any.
NewSignatureType creates a new function type for the given receiver, receiver type parameters, type parameters, parameters, and results.
NewSlice returns a new slice type for the given element type.
NewStruct returns a new struct with the given fields and corresponding field tags.
NewTerm returns a new union term.
NewTuple returns a new tuple for the given variables.
NewTypeName returns a new type name denoting the given typ.
NewTypeNameLazy returns a new defined type like NewTypeName, but it lazily calls resolve to finish constructing the Named object.
NewTypeParam returns a new TypeParam.
NewUnion returns a new Union type with the given terms.
NewVar returns a new variable.
ObjectString returns the string form of obj.
RangeKeyVal returns the key and value types for a range over typ.
RelativeTo returns a Qualifier that fully qualifies members of all packages other than pkg.
Satisfies reports whether type V satisfies the constraint T.
SelectionString returns the string form of s.
SizesFor returns the Sizes used by a compiler for an architecture.
TypeString returns the string representation of typ.
Unalias returns t if it is not an alias type; otherwise it follows t's alias chain until it reaches a non-alias type which is then returned.
WriteSignature writes the representation of the signature sig to buf, without a leading "func" keyword.
WriteType writes the string representation of typ to buf.

# Constants

predeclared types.
aliases.
No description provided by the author
No description provided by the author
x.f is a struct field selector.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
type is invalid.
Properties of basic types.
Properties of basic types.
Properties of basic types.
Properties of basic types.
Properties of basic types.
Properties of basic types.
Properties of basic types.
Properties of basic types.
Properties of basic types.
Properties of basic types.
x.f is a method expression.
x.f is a method selector.
The direction of a channel is indicated by one of these constants.
No description provided by the author
The direction of a channel is indicated by one of these constants.
The direction of a channel is indicated by one of these constants.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
types for untyped values.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Typ contains the predeclared *Basic types indexed by their corresponding BasicKind.
The Universe scope contains all predeclared objects of Go.
The Unsafe package is the package returned by an importer for the import path "unsafe".

# Structs

An Alias represents an alias type.
An ArgumentError holds an error associated with an argument index.
An Array represents an array type.
A Basic represents a basic type.
A Builtin represents a built-in function.
A Chan represents a channel type.
A Checker maintains the state of the type checker.
A Config specifies the configuration for type checking.
A Const represents a declared constant.
A Context is an opaque type checking context.
An Error describes a type-checking error; it implements the error interface.
A Func represents a declared function, concrete method, or abstract (interface) method.
Info holds result type information for a type-checked package.
An Initializer describes a package-level variable, or a list of variables in case of a multi-valued initialization expression, and the corresponding initialization expression.
Instance reports the type arguments and instantiated type for type and function instantiations.
An Interface represents an interface type.
A Label represents a declared label.
A Map represents a map type.
A Named represents a named (defined) type.
Nil represents the predeclared value nil.
A Package describes a Go package.
A PkgName represents an imported Go package.
A Pointer represents a pointer type.
A Scope maintains a set of objects and links to its containing (parent) and contained (children) scopes.
A Selection describes a selector expression x.f.
A Signature represents a (non-builtin) function or method type.
A Slice represents a slice type.
StdSizes is a convenience type for creating commonly used Sizes.
A Struct represents a struct type.
A Tuple represents an ordered list of variables; a nil *Tuple is a valid (empty) tuple.
TypeAndValue reports the type and value (for constants) of the corresponding expression.
TypeList holds a list of types.
A TypeName represents a name for a (defined or alias) type.
A TypeParam represents a type parameter type.
TypeParamList holds a list of type parameters.
A Union represents a union of terms embedded in an interface.
A Variable represents a declared variable (including function parameters and results, and struct fields).

# Interfaces

An Importer resolves import paths to Packages.
An ImporterFrom resolves import paths to packages; it supports vendoring per https://golang.org/s/go15vendor.
An Object describes a named language entity such as a package, constant, type, variable, function (incl.
Sizes defines the sizing functions for package unsafe.

# Type aliases

BasicInfo is a set of flags describing properties of a basic type.
BasicKind describes the kind of basic type.
A ChanDir value indicates a channel direction.
ImportMode is reserved for future use.
A Qualifier controls how named package-level objects are printed in calls to TypeString, ObjectString, and SelectionString.
SelectionKind describes the kind of a selector expression x.f (excluding qualified identifiers).
A Term represents a term in a Union.
A Type represents a type of Go.