util

package
v0.0.0-...-8e4e7ff Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJsonFromRaw

func GetJsonFromRaw(raw []byte) (string, error)

func GetMapFromRaw

func GetMapFromRaw(raw []byte) (map[string]interface{}, error)

func GetPrettyJsonFromMap

func GetPrettyJsonFromMap(input map[string]interface{}) (string, error)

func GetPrettyJsonFromString

func GetPrettyJsonFromString(ugly string) (string, error)

func IsPropperHash

func IsPropperHash(hash string) bool

TODO improve approach

func LoadJsonFile

func LoadJsonFile(filepath string) map[string]interface{}

func LoadMultipleJsonFiles

func LoadMultipleJsonFiles(metadataFile string) map[string]interface{}

func SetValueInStructByJsonKey

func SetValueInStructByJsonKey(item interface{}, fieldName string, value interface{}) error

Set field by json name

func YesOrNoQuestion

func YesOrNoQuestion(question string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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