files

package
v0.4.31 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertJSONArrayToYAML

func ConvertJSONArrayToYAML(jsonContent string) (string, error)

func ConvertJSONMapToYAML

func ConvertJSONMapToYAML(jsonContent string) (string, error)

func ConvertYAMLArrayToJSON

func ConvertYAMLArrayToJSON(yamlContent string) (string, error)

func ConvertYAMLMapToJSON

func ConvertYAMLMapToJSON(yamlContent string) (string, error)

func GarbageCollectTemporaryFiles added in v0.4.25

func GarbageCollectTemporaryFiles(tempDir string, mask string, n int) ([]string, error)

GarbageCollectTemporaryFiles deletes the oldest files in a directory based on a given mask, leaving only 'n' newest files. It returns a slice of paths of the deleted files. It requires read and write permissions on the directory. If it encounters a file that it cannot delete, it will stop and return the files it has deleted so far along with the error.

func LoadJSONFile

func LoadJSONFile(path string, target interface{}) error

func LoadYAMLFile

func LoadYAMLFile(path string, target interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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