utils

package
v0.0.0-...-cfab3c0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatIdleTimeout

func FormatIdleTimeout(timeout any) string

func GetCommandId

func GetCommandId(xml string) (id string)

func GetNodeText

func GetNodeText(n *xmlquery.Node) string

func GetShellId

func GetShellId(xml string) (id string)

func Iso8601Duration

func Iso8601Duration(seconds int) string

convierte segundos a formato ISO8601 duración.

func NewUuid

func NewUuid() string

func OptOrDefault

func OptOrDefault(options Arguments, key string, defaultValue any) any

func OptStringSlice

func OptStringSlice(opts Arguments, key string, defaultVal []string) []string

optStringSlice es un helper para obtener []string desde map[string]any

func ParseOutput

func ParseOutput(xml []byte, oc *Output) (finish bool)

func ParseXML

func ParseXML(xml string) (*xmlquery.Node, error)

Types

type Arguments

type Arguments = map[string]any

type Output

type Output struct {
	Stdout   strings.Builder
	Stderr   strings.Builder
	ExitCode int
}

Jump to

Keyboard shortcuts

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