helpers

package
v0.0.0-...-d51558a Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGitSha

func CheckGitSha(filename string, size int64, expected string) error

CheckGitSha checks the "git hash" of the file, returns nil when the hash has the expected value

func CheckSha256

func CheckSha256(filename string, expected string) error

CheckSha256 checks the "git hash" of the file, returns nil when the hash has the expected value

func GitShaFileContents

func GitShaFileContents(name string, size int64) ([]byte, error)

GitShaFileContents returns the "git hash" of a file

func Keys

func Keys[A comparable, B interface{}](m map[A]B) []A

Keys returns a slice of map keys

func ListFilesWithSuffix

func ListFilesWithSuffix(dir, suf string) ([]string, error)

func NewTmpFileWithRenameOnClose

func NewTmpFileWithRenameOnClose(dir, pattern, rename string) (io.WriteCloser, error)

func OrderedKeys

func OrderedKeys[A constraints.Ordered, B interface{}](m map[A]B) []A

OrderedKeys returns a sorted slice of map keys

Types

This section is empty.

Jump to

Keyboard shortcuts

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