querypath

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package querypath implements locked path canonicalization for stat and content APIs.

Rules:

  • empty or omitted path means the caller-supplied root
  • leading "/" is accepted and removed
  • ".", "..", empty interior segments, and NUL bytes are rejected

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidQueryPath = errors.New("invalid query path")

ErrInvalidQueryPath identifies malformed client query paths.

Functions

func CanonicalizeQueryPath

func CanonicalizeQueryPath(p string) (string, error)

CanonicalizeQueryPath normalizes a path from a stat/content query string. The empty string denotes the root. Leading slashes are stripped; internal path semantics are validated but otherwise unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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