tree

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Path

type Path string

Path is a custom type for representing paths in the configuration

func NewPath

func NewPath(path ...string) Path

func (Path) FindParentWithKey

func (p Path) FindParentWithKey(key string) Path

FindParentWithKey returns the first parent path that has the specified key

func (Path) Last

func (p Path) Last() string

Last returns the last part of the path

func (Path) Matches

func (p Path) Matches(pattern Path) bool

Matches checks if the path matches a given pattern

func (Path) Next

func (p Path) Next(path string) Path

Next returns the next part of the path

func (Path) Parent

func (p Path) Parent() Path

Parent returns the parent path

func (Path) Parts

func (p Path) Parts() []string

Parts returns the parts of the path

func (Path) String

func (p Path) String() string

String returns the string representation of the path

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳