simplifypath

package
v0.0.0-...-b21d1cf Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 2 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	PathFragment

	// Greedy makes the node match all remnaining path elements as well
	Greedy bool
	// contains filtered or unexported fields
}

func L

func L(fragment string, children ...Node) Node

func V

func V(fragment string, children ...Node) Node

func VGreedy

func VGreedy(fragment string) Node

type PathFragment

type PathFragment interface {
	Matches(part string) bool
	Represent() string
}

PathFragment Interface for tree leaves to help resolve paths

type Simplifier

type Simplifier interface {
	Simplify(path string) string
}

Simplifier knows how to simplify a path

func NewSimplifier

func NewSimplifier(tree Node) Simplifier

NewSimplifier builds a new simplifier for the tree

Jump to

Keyboard shortcuts

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