pathparse

package
v0.0.1-78 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseParts

func ParseParts(path, tpl string) []string

ParseParts parses a path by template and returns the parts.

Types

type Parser

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

Parser is a helper to aid in the parsing of paths.

func NewParser

func NewParser(parseTpl string) *Parser

NewParser creates a new parser based on a specific template.

func (*Parser) Match

func (p *Parser) Match(path string) bool

Match returns whether the provided path matches the path parser template.

func (*Parser) ParseParts

func (p *Parser) ParseParts(path string) []string

ParseParts returns the parsed parts of a path.

Jump to

Keyboard shortcuts

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