files

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Categorize

func Categorize[T any](fileAssets map[string]T, overrides map[string]*regexp.Regexp) (osArchPreferred map[string]T, checksums, others []T)

Categorize files assets to preferred ones for different operating systems and architectures, checksums, and other kinds.

The fileAssets argument is a map with filenames as keys and assets as values.

The overrides argument has OS/arch strings as keys, and regular expressions applied against filenames in fileAssets as values that are processed before the default categorization rules. If an override regular expression matches an asset filename, it will cause the asset to be treated as the preferred one for the OS/arch in the override.

The returned osArchPreferred is has OS/arch strings as keys, and the corresponding assets as values. All given assets are present in at most one of the return values. The only ones that are not in any are ones that apply to an OS/architecture combination, but for which a more preferred one was found.

func HasExecutablePerms

func HasExecutablePerms(fi os.FileInfo) bool

func MakeExecutable

func MakeExecutable(path string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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