util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(input any, output any) error

Decode decodes the input into the output based on json tags

func EncodeIndexValue

func EncodeIndexValue(value any) []byte

func JSONString

func JSONString(input any) string

JSONString returns a json string of the input

func JSONToYAML

func JSONToYAML(jsonContent []byte) ([]byte, error)

func PrettyJSONString added in v0.1.0

func PrettyJSONString(input any) string

PrettyJSONString returns a pretty json string of the input

func RemoveElement

func RemoveElement[T any](index int, results []T) []T

func ValidateStruct

func ValidateStruct(val any) error

func YAMLToJSON

func YAMLToJSON(yamlContent []byte) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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