helpers

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package helpers is just some helper utils. Arguably this should be moved out of it's own package in to the appropriate main packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertDirsToAboluteDirs

func ConvertDirsToAboluteDirs(orig []string) ([]string, error)

ConvertDirsToAboluteDirs turns directories in to absolute path directories

func FilenameMatchesGlobs

func FilenameMatchesGlobs(filename string, globs []string) bool

FilenameMatchesGlobs Check if a filename matches a set of globs

func GetSha256

func GetSha256(file string) (string, error)

GetSha256 Get sha256 hash from a file

func IsDirectory

func IsDirectory(path string) bool

IsDirectory returns a bool if a file is a directory

func MustGetSha256

func MustGetSha256(file string) string

MustGetSha256 panics if a Sha256 cannot be generated

func SuitcaseFormatWithFilename

func SuitcaseFormatWithFilename(filename string) (string, error)

SuitcaseFormatWithFilename detects the format of a suitcase from the given filename

func WriteHashFile

func WriteHashFile(hs []HashSet, o io.Writer) error

WriteHashFile writes out the hashset array to an io.Writer

Types

type HashSet

type HashSet struct {
	Filename string
	Hash     string
}

HashSet is a combination Filename and Hash

Jump to

Keyboard shortcuts

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