Skip to main content

Name

type Name

type Name struct {
// contains filtered or unexported fields
}

func LiftFromExternalName

func LiftFromExternalName(handle uint64) *Name

func NameFromStr

func NameFromStr(s string) (*Name, error)

func (*Name) DebugString

func (_self *Name) DebugString() string

func (*Name) Destroy

func (object *Name) Destroy()

func (*Name) Eq

func (_self *Name) Eq(other *Name) bool

func (*Name) Format

func (_self *Name) Format(format NameFormat) string

Formats a name into a string based on the available output formats. The default separator is `.`

func (*Name) Hash

func (_self *Name) Hash() uint64

func (*Name) IsSln

func (_self *Name) IsSln() bool

Returns whether this name is a second-level name (Ex. `test.iota`)

func (*Name) IsSubname

func (_self *Name) IsSubname() bool

Returns whether this name is a subname (Ex. `sub.test.iota`)

func (*Name) Label

func (_self *Name) Label(index uint32) *string

Get the label at the given index

func (*Name) Labels

func (_self *Name) Labels() []string

Get all of the labels. NOTE: These are in reverse order starting with the top-level name and proceeding to subnames.

func (*Name) Ne

func (_self *Name) Ne(other *Name) bool

func (*Name) NumLabels

func (_self *Name) NumLabels() uint32

Returns the number of labels including TLN.

func (*Name) Parent

func (_self *Name) Parent() **Name

parents; second-level names return `None`.

func (*Name) String

func (_self *Name) String() string