Help us shape the future of Go! Take the 2026 Go Developer Survey

pathutil

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package pathutil provides filesystem-path normalization for SessionStore composition helpers. Opaque tenant/session IDs must never pass through it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canonicalize

func Canonicalize(paths []string) ([]string, error)

Canonicalize returns sorted, duplicate-free canonical filesystem paths. It resolves the deepest existing prefix through symlinks and appends a missing suffix. Empty inputs are ignored and any ambiguous resolution fails closed.

Types

type CanonicalPathError

type CanonicalPathError struct {
	Path  string
	Op    string
	Cause error
}

CanonicalPathError reports that a filesystem path could not be resolved without ambiguity.

func (*CanonicalPathError) Error

func (e *CanonicalPathError) Error() string

func (*CanonicalPathError) Unwrap

func (e *CanonicalPathError) Unwrap() error

Jump to

Keyboard shortcuts

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