filecatalog

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanFSRoot

func CleanFSRoot(root string) string

CleanFSRoot normalizes a root path for use with fs.FS while preserving nonblank leading and trailing whitespace.

func DisplayPath

func DisplayPath(root string, name string) string

DisplayPath returns name relative to root for messages about fs.FS paths.

func FindFSYAMLFiles

func FindFSYAMLFiles(ctx context.Context, fsys fs.FS, root string) ([]string, error)

FindFSYAMLFiles returns root itself when it names a file. For a directory root, it returns sorted paths for .yaml and .yml files beneath that root.

func FindYAMLFiles

func FindYAMLFiles(ctx context.Context, root string) ([]string, error)

FindYAMLFiles returns sorted full paths for .yaml and .yml files under root.

func IsYAMLFile

func IsYAMLFile(name string) bool

func RelativePath

func RelativePath(root string, filePath string) string

RelativePath computes a clean relative path from root to path.

func ResolveFSPath

func ResolveFSPath(root string, baseDir string, userPath string) (string, string, error)

ResolveFSPath resolves userPath from baseDir and keeps it inside root.

Types

This section is empty.

Jump to

Keyboard shortcuts

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