validate

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBasePathInvalid = errors.New("base path is invalid, check it does not include spaces or any illegal characters")
View Source
var ErrBasePathTrailingSlash = errors.New("base path should not have a trailing slash '/'")
View Source
var ErrDomainEmpty = errors.New("domain cannot be empty")
View Source
var ErrDomainInvalid = errors.New("domain is invalid, check it does not include spaces or any illegal characters")
View Source
var ErrPathContainsDirTraversal = errors.New("path contains illegal '..' for directory traversal")
View Source
var ErrPathContainsInvalidCharacters = errors.New("path contains invalid characters")
View Source
var ErrPathMustIncludeFileExt = errors.New("path must end with a file extension e.g. '.html'")
View Source
var ErrPathMustStartWithSlash = errors.New("path must start with '/'")

Functions

func IsValidBasePath

func IsValidBasePath(basePath string) error

func IsValidDomain

func IsValidDomain(domain string) error

func IsValidFilePath

func IsValidFilePath(filePath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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