hsnode

package
v0.0.0-...-667d129 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package hsnode contains an implementation of a node graph, as parent and child nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Children

type Children map[name]*Node

Children represents represents subnodes

type Node

type Node struct {
	Parent *Node

	Children
	// contains filtered or unexported fields
}

Node represents node

func NewNode

func NewNode(name string) *Node

NewNode creates a new node

func (*Node) Insert

func (n *Node) Insert(p Path) *Node

Insert inserts a new path to node

func (*Node) SetParent

func (n *Node) SetParent(p *Node) *Node

SetParent sets node's parent

func (*Node) String

func (n *Node) String() string

String represents node's name

type Path

type Path = string

Path represents node path

Jump to

Keyboard shortcuts

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