v1.18.0-beta1 Latest Latest

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

Go to latest
Published: Aug 17, 2022 License: BSD-2-Clause Imports: 2 Imported by: 0


Rendered for js/wasm



This section is empty.


View Source
var (
	ErrSyntax = &errorString{"invalid syntax"}


func ArrayOf

func ArrayOf(count int, elem Type) Type

func ChanOf

func ChanOf(dir ChanDir, t Type) Type

func Copy

func Copy(dst, src Value) int

func DeepEqual

func DeepEqual(a1, a2 interface{}) bool

func FuncOf

func FuncOf(in, out []Type, variadic bool) Type

func MapOf

func MapOf(key, elem Type) Type

func PtrTo

func PtrTo(t Type) Type

PtrTo returns the pointer type with element t. For example, if t represents type Foo, PtrTo(t) represents *Foo.

func SliceOf

func SliceOf(t Type) Type

func Swapper

func Swapper(slice interface{}) func(i, j int)

func TypeOf

func TypeOf(i interface{}) Type


type ChanDir

type ChanDir int
const (
	RecvDir ChanDir             = 1 << iota // <-chan
	SendDir                                 // chan<-
	BothDir = RecvDir | SendDir             // chan

type Method

type Method struct {
	// Name is the method name.
	// PkgPath is the package path that qualifies a lower case (unexported)
	// method name. It is empty for upper case (exported) method names.
	// The combination of PkgPath and Name uniquely identifies a method
	// in a method set.
	// See
	Name    string
	PkgPath string

	Type  Type  // method type
	Func  Value // func with receiver as first argument
	Index int   // index for Type.Method

Method represents a single method.

type SelectDir

type SelectDir int

A SelectDir describes the communication direction of a select case.

const (
	SelectSend    SelectDir // case Chan <- Send
	SelectRecv              // case <-Chan:
	SelectDefault           // default

type StructTag

type StructTag string

A StructTag is the tag string in a struct field.

By convention, tag strings are a concatenation of optionally space-separated key:"value" pairs. Each key is a non-empty string consisting of non-control characters other than space (U+0020 ' '), quote (U+0022 '"'), and colon (U+003A ':'). Each value is quoted using U+0022 '"' characters and Go string literal syntax.

type TypeEx

type TypeEx interface {
	Key() Type

Jump to

Keyboard shortcuts

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