common

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColorCyan = color.New(color.FgCyan).SprintFunc()
View Source
var ColorGreen = color.New(color.FgGreen).SprintFunc()
View Source
var ColorGrey = color.New(color.FgHiBlack).SprintFunc()
View Source
var ColorRed = color.New(color.FgRed).SprintFunc()

Functions

func Contains

func Contains[T comparable](slice []T, item T) bool

func DeepClone added in v0.3.0

func DeepClone(src, dst interface{}) error

func DownloadFile added in v0.2.0

func DownloadFile(url, target string) error

func ExtractTar added in v0.2.0

func ExtractTar(reader io.Reader, dest string) error

func ExtractTarFromFile added in v0.2.0

func ExtractTarFromFile(src, dest string) error

func ExtractTarGz added in v0.2.0

func ExtractTarGz(gzipStream io.Reader, dest string) error

func GetArch added in v0.2.0

func GetArch() string

func GetFileSha256

func GetFileSha256(path string) (string, error)

func GetFilesSha256

func GetFilesSha256(paths []string) (string, error)

func GetGitBranch

func GetGitBranch(path string) (string, error)

func GetGitCommit

func GetGitCommit(path string) (string, error)

func GetGitOwner

func GetGitOwner(path string) (string, error)

func GetPipeImage

func GetPipeImage(image string) string

func IsDirExists

func IsDirExists(path string) bool

func IsFileExists

func IsFileExists(path string) bool

func MergeMaps

func MergeMaps[K comparable, V any](maps ...map[K]V) map[K]V

func NewID

func NewID(prefix string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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