util

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FailedColor = color.New(color.FgRed).SprintfFunc()
View Source
var OkColor = color.New(color.FgGreen).SprintfFunc()
View Source
var WarningColor = color.New(color.FgYellow).SprintfFunc()

Functions

func DurationToString

func DurationToString(d time.Duration) string

func ExpandPath

func ExpandPath(path string) string

func ExpandVariables

func ExpandVariables(text string, replaceMap map[string]string) string

func FileExists

func FileExists(path string) bool

func GetFullPathFromFile

func GetFullPathFromFile(path string) (string, error)

func GetProcessEnvironmentMarker

func GetProcessEnvironmentMarker(context string) string

func GetStringListIndex

func GetStringListIndex(stringList []string, elem string) int

func HashMd5File

func HashMd5File(filePath string) (string, error)

func IsInStringList

func IsInStringList(stringList []string, string string) bool

func ReverseStringList

func ReverseStringList(elements []string) []string

func WriteToIoWriter

func WriteToIoWriter(writer io.Writer, format string, vars ...interface{})

Types

type Command

type Command []string

func (*Command) Arguments

func (c *Command) Arguments() []string

func (*Command) ExpandEnvironment

func (c *Command) ExpandEnvironment() Command

func (*Command) GetFileHashes

func (c *Command) GetFileHashes() (map[string]string, error)

func (*Command) GetFullyPrepared

func (c *Command) GetFullyPrepared(replaceMap map[string]string) Command

func (*Command) Path

func (c *Command) Path() string

type GroupNameSpecifier

type GroupNameSpecifier struct {
	// contains filtered or unexported fields
}

func NewGroupNameSpecifier

func NewGroupNameSpecifier(specifier string) (*GroupNameSpecifier, error)

func (*GroupNameSpecifier) IsMatchingGroupAndName

func (s *GroupNameSpecifier) IsMatchingGroupAndName(group string, name string) bool

Jump to

Keyboard shortcuts

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