pathmanager

package
v1.0.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2018 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PathManager

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

PathManager is a prefix searchable index of paths

func New

func New() *PathManager

New creates a new path manager

func (*PathManager) AddPaths

func (p *PathManager) AddPaths(paths []string)

AddPaths adds path to the paths list

func (*PathManager) HasExactPath

func (p *PathManager) HasExactPath(path string) bool

HasExactPath returns if the longest match is an exact match for the full path

func (*PathManager) HasPath

func (p *PathManager) HasPath(path string) bool

HasPath returns if the prefix for the path exists regardless if it is a path (ending with /) or a prefix for a leaf node

func (*PathManager) Len

func (p *PathManager) Len() int

Len returns the number of paths

func (*PathManager) Paths

func (p *PathManager) Paths() []string

Paths returns the path list

func (*PathManager) RemovePathPrefix

func (p *PathManager) RemovePathPrefix(prefix string)

RemovePathPrefix removes all paths with the given prefix

func (*PathManager) RemovePaths

func (p *PathManager) RemovePaths(paths []string)

RemovePaths removes paths from the paths list

Jump to

Keyboard shortcuts

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