data

package module
v0.0.0-...-5452d80 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 6 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterfaceToBytes

func InterfaceToBytes(key interface{}) ([]byte, error)

InterfaceToBytes convert a interface{} to a []byte

func LoadJSONFile

func LoadJSONFile(f string, object interface{}) error

LoadJSONFile method dumps data from the file f to object

func LoadYAMLFile

func LoadYAMLFile(file string, object interface{}) error

func ObjectToJSONByte

func ObjectToJSONByte(object interface{}) ([]byte, error)

ObjectToJSONByte converts any object to a json byte

func ObjectToJSONString

func ObjectToJSONString(object interface{}) (string, error)

ObjectToJSONString converts any object to a json string

func ObjectToJSONStringPretty

func ObjectToJSONStringPretty(object interface{}) (string, error)

ObjectToJSONStringPretty converts any object to a json string with a pretty format

func ObjectToYamlString

func ObjectToYamlString(object interface{}) (string, error)

ObjectToYamlString converts any object to a yaml string

Types

This section is empty.

Jump to

Keyboard shortcuts

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