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

storepaths

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package storepaths normalizes relative paths shared by file stores and memory tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(name string, directory bool) (string, error)

Normalize cleans a local relative path and returns forward-slash separators. Backslashes are accepted as separators on every platform. Rooted paths, paths invalid on the host platform, root escapes and NUL bytes return an error wrapping fs.ErrInvalid. Empty or whitespace-only paths select the root only when directory is true. A cleaned "." also selects the root only for directories. Non-empty path components must not be whitespace-only. Volume names and reserved names follow the host platform's filepath.IsLocal rules.

Types

This section is empty.

Jump to

Keyboard shortcuts

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