Help us shape the future of Go! Take the 2026 Go Developer Survey

datautil

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package datautil provides utilities for working with data types.

Index

Constants

View Source
const (
	YQ_OUTPUT_FORMAT_JSON = "json"
	YQ_OUTPUT_FORMAT_YAML = "yaml"
)

Variables

This section is empty.

Functions

func ConvertAndMapStringArr

func ConvertAndMapStringArr(ifaceArr []interface{}, f func(string) string) []string

ConvertAndMapStringArr converts an array of interfaces to an array of strings, applying the supplied function to each element.

func ConvertStringArr

func ConvertStringArr(ifaceArr []interface{}) []string

ConvertStringArr converts an array of interfaces to an array of strings.

func ConvertVariables

func ConvertVariables(vars []cfclient.Variable) (map[string]string, map[string]string)

ConvertVariables converts an array of cfclient. Variables to 2 maps of key/value pairs - first one for un-encrypted variables second one for encrypted variables.

func FlattenStringArr

func FlattenStringArr(sArr []string) []interface{}

FlattenStringArr flattens an array of strings.

func Yq

func Yq(yamlString string, expression string, outputformat string) (string, error)

Yq gets a value from a YAML string using yq

Types

This section is empty.

Jump to

Keyboard shortcuts

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