utils

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBackupTimestamp

func FormatBackupTimestamp(t time.Time) string

FormatBackupTimestamp formats the timestamp in a Windows-compatible way

func SanitizePath

func SanitizePath(path string) string

SanitizePath ensures the path is valid for the current OS

func ValidateCommand

func ValidateCommand(cmd string, args []string, allowedCmds map[string][]string) error

ValidateCommand checks if a command and its arguments are allowed

func ValidatePath

func ValidatePath(path string, allowedPaths []string) error

ValidatePath checks if a given path is within allowed directories

Types

This section is empty.

Jump to

Keyboard shortcuts

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