utils

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LacquerRootDir  string
	LacquerCacheDir string
)

Functions

func BuildMetadata

func BuildMetadata(workflow *ast.Workflow) map[string]interface{}

buildMetadata creates metadata map from workflow

func CopyMap

func CopyMap(src map[string]interface{}) map[string]interface{}

CopyMap creates a deep copy of a map

func FormatDuration

func FormatDuration(d time.Duration) string

FormatDuration formats a duration in a human-readable way

func GenerateRunID

func GenerateRunID() string

generateRunID creates a unique identifier for a workflow execution

func GetEnvironmentVars

func GetEnvironmentVars() map[string]string

getEnvironmentVars returns a map of environment variables

func GetMapValue

func GetMapValue(m map[string]interface{}, path string) (interface{}, bool)

GetMapValue safely gets a value from a nested map using dot notation

func IsValidVariableName

func IsValidVariableName(name string) bool

IsValidVariableName checks if a string is a valid variable name

func MergeMap

func MergeMap(dst, src map[string]interface{})

MergeMap merges source map into destination map

func SafeBool

func SafeBool(v interface{}) bool

SafeBool safely converts an interface to bool

func SafeInt

func SafeInt(v interface{}) int

SafeInt safely converts an interface to int

func SafeString

func SafeString(v interface{}) string

SafeString safely converts an interface to string

func SetMapValue

func SetMapValue(m map[string]interface{}, path string, value interface{})

SetMapValue safely sets a value in a nested map using dot notation

Types

This section is empty.

Jump to

Keyboard shortcuts

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