frame

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

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

A Frame is a collection of siblings in a trie, sorted alphabetically by name.

func New

func New(n noder.Noder) (*Frame, error)

New returns a frame with the children of the provided node.

func (*Frame) Drop

func (f *Frame) Drop()

Drop extracts the noder with the alphabetically smaller name in the frame or does nothing if the frame was empty.

func (*Frame) First

func (f *Frame) First() (noder.Noder, bool)

First returns, but dont extract, the noder with the alphabetically smaller name in the frame and true if the frame was not empty. Otherwise it returns nil and false.

func (*Frame) Len

func (f *Frame) Len() int

Len returns the number of noders in the frame.

func (*Frame) String

func (f *Frame) String() string

String returns the quoted names of the noders in the frame sorted in alphabetical order by name, surrounded by square brackets and separated by comas.

Examples:

[]
["a", "b"]

Jump to

Keyboard shortcuts

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