utils

package
v1.0.640 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package utils is for general utility functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsDirectoryTraversal added in v1.0.637

func ContainsDirectoryTraversal(path string) bool

ContainsDirectoryTraversal checks for directory traversal attempts in path

func FindFilesByExt

func FindFilesByExt(searchDir string, ext string) ([]string, int)

FindFilesByExt recurses through the given searchDir returning a list of files with a given extension and it's length

func PathAction

func PathAction(s *sls.Sls, path string, action string)

PathAction applies an action to a YAML path

func ProcessDir

func ProcessDir(searchDir string, fileExt string, action string, outputFilePath string, topLevelElement string, pk pki.Pki) error

ProcessDir applies an action concurrently to a directory of files

func SafeWrite

func SafeWrite(buffer bytes.Buffer, outputFilePath string, err error)

SafeWrite checks that there is no error prior to trying to write a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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