closedutil

package
v0.0.0-...-82c290f Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2018 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllMask

func AllMask(b *closed.Bitset) uint64

AllMask returns a mask with every bit in b.Flags set.

func AlwaysValid

func AlwaysValid(t closed.Type) bool

AlwaysValid returns true if t is always valid.

This happens for bitsets with flags for each bit and an enum whose underlying type is bool.

func ContainsLabeledZero

func ContainsLabeledZero(t *closed.Enum) bool

ContainsLabeledZero reports whether t includes an explicit label for its zero value.

func ExternallyExhaustible

func ExternallyExhaustible(t closed.Type) bool

ExternallyExhaustible is true if every label/member/field of t is exported.

The question of whether the type of t itself is exported is unrelated.

func Find

func Find(t *types.TypeName, vs []closed.Type) closed.Type

Find t in vs or return nil.

func FirstExportedLabel

func FirstExportedLabel(vs []*types.Const) *types.Const

FirstExportedLabel returns the first v in vs with an exported name or nil if there is none.

func FirstExportedType

func FirstExportedType(t *closed.TypeNamesAndType) types.Type

FirstExportedType returns a Type correponding to FirstExportedTypeName which is a pointer if t.Type is a pointer.

func FirstExportedTypeName

func FirstExportedTypeName(ts []*types.TypeName) *types.TypeName

FirstExportedTypeName returns the first t in ts with an exported name or nil if there are none.

func ImportsOf

func ImportsOf(c closed.Type) (imports map[string]bool, err error)

ImportsOf extracts all packages that need to be imported in a file exhaustively testing members of c.

Types

This section is empty.

Jump to

Keyboard shortcuts

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