myitcv.io: myitcv.io/immutable/util Index | Files

package util

import "myitcv.io/immutable/util"

Index

Package Files

ast.go types.go

func IsImmTmpl Uses

func IsImmTmpl(ts *ast.TypeSpec) (string, bool)

IsImmTmpl determines whether the supplied type spec is an immutable template type (either a struct, slice or map), returning the name of the type with the ImmTypeTmplPrefix removed in that case

type ImmType Uses

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

func IsImmType Uses

func IsImmType(t types.Type) ImmType

IsImmType determines whether the supplied type is an immutable type. In case a type is immutable, a value of type ImmTypeStruct, ImmTypeSlice or ImmTypeMap is returned. In case the type is immutable but neither of the aforementioned instances, ImmTypeUnknown is returned. If a type is not immutable then nil is returned

type ImmTypeBasic Uses

type ImmTypeBasic struct{}

ImmTypeBasic identifies Go types that are inherently immutable, e.g. ints, strings

type ImmTypeImplsIntf Uses

type ImmTypeImplsIntf struct{}

ImmTypeImplsIntf is used to indicate a type that is not an ImmTypeStruct, ImmTypeMap or ImmTypeSlice, but still satisfies the immutable "interface". See the docs for myitcv.io/immutable.Immutable.

type ImmTypeMap Uses

type ImmTypeMap struct {
    Key  types.Type
    Elem types.Type
}

ImmTypeMap is used to indicate a type that is immutable by virtue of being a pointer to a struct type that was itself generated from an _Imm_ map template.

type ImmTypeSimple Uses

type ImmTypeSimple struct{}

ImmTypeSimple is used to indiciate an interface type that extends the myitcv.io/immutable.Immutable interface.

type ImmTypeSlice Uses

type ImmTypeSlice struct {
    Elem types.Type
}

ImmTypeMap is used to indicate a type that is immutable by virtue of being a pointer to a struct type that was itself generated from an _Imm_ slice template.

type ImmTypeStruct Uses

type ImmTypeStruct struct {
    Struct *types.Struct
}

ImmTypeStruct is used to indicate a type that is immutable by virtue of being a pointer to a struct type that was itself generated from an _Imm_ struct template.

Package util imports 6 packages (graph) and is imported by 3 packages. Updated 2018-09-25. Refresh now. Tools for package owners.