utils

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDirPerms

func CheckDirPerms(dirpath string) (err error)

function designed to check to make sure the specified directory has the correct permission and exists.

if the directory does not exist, the function will attempt to create the directory.

func CleanDirname added in v0.3.0

func CleanDirname(dirname string) string

function designed to clean and return a passed in directory name. this will strip any non-printable chars using TrimSpace, pass the dirname through the filepath.Clean func, etc.

func ReadFilenameMD

func ReadFilenameMD(ctx context.Context) (string, error)

function designed to read the filename header value from the given context's metadata. if the header cannot be found, or is empty, an error will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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