pathvalidation

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package pathvalidation provides validation utilities for file paths

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPathComponents

func CheckPathComponents(path string) error

CheckPathComponents checks each component of a path for unresolved template variables. This is useful when you want to identify which specific directory component has the issue.

func CheckUnresolvedTemplateVars

func CheckUnresolvedTemplateVars(path string) error

CheckUnresolvedTemplateVars checks if a path contains unresolved template variables. Returns an error if any template-like patterns are found.

func ValidatePathForCreation

func ValidatePathForCreation(path string) error

ValidatePathForCreation performs all validation checks suitable for path creation operations. This includes checking for unresolved template variables.

Types

type UnresolvedTemplateError

type UnresolvedTemplateError struct {
	Path     string
	Variable string
	Pattern  string
}

UnresolvedTemplateError indicates a path contains unresolved template variables

func (*UnresolvedTemplateError) Error

func (e *UnresolvedTemplateError) Error() string

Jump to

Keyboard shortcuts

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