tree

package
v0.0.0-...-cdee56d Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URLNode

type URLNode struct {
	sync.Mutex
	// contains filtered or unexported fields
}

URLNode represents a Node in the URL tree

func NewNode

func NewNode(url string) *URLNode

NewNode return a new node of URLNode

func (*URLNode) AddChild

func (node *URLNode) AddChild(childURL string) *URLNode

AddChild adds a new child to the given node. Returns the newly created child node

func (*URLNode) GenerateTree

func (node *URLNode) GenerateTree() string

GenerateTree tree builds the tree which shows links between nodes. Returns the complete tree pointed to by node.

func (*URLNode) WriteTree

func (node *URLNode) WriteTree(writer io.Writer)

WriteTree generates the tree and writes it to the writer.

Jump to

Keyboard shortcuts

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