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

datautil

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MPL-2.0 Imports: 6 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 Hashcode added in v1.0.0

func Hashcode(s string) int

String hashes a string to a unique hashcode.

Copied from github.com/hashicorp/terraform-plugin-sdk/helper/hashcode as it is removed in v2 and used within the provider. By copying the implementation we can avoid a dependency on the terraform-plugin-sdk which is no longer maintained.

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