utils

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PermDir      = 0o755 // Directory permission
	PermOwner    = 0o600 // Owner permission
	PermGroup    = 0o640 // Group permission
	PermPublic   = 0o644 // Public permission
	PermReadOnly = 0o444 // Read-only permission
)

Variables

View Source
var (
	ErrModuleNotFound       = errors.New("module not found in build info")
	ErrBuildInfoUnavailable = errors.New("build info unavailable")
	ErrInvalidFilePath      = errors.New("invalid file path")
	ErrPathTraversal        = errors.New("path traversal detected")
)

Functions

func GetModuleVersion added in v0.13.1

func GetModuleVersion(module string) (string, error)

GetModuleVersion retrieves the version of a specified module from the build info.

func VerifyAndSanitizePath added in v0.19.0

func VerifyAndSanitizePath(path, trustedRoot string) (string, error)

VerifyAndSanitizePath checks if a file path is valid and sanitizes it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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