helpers

package
v0.0.0-...-b65a399 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFileWithDirs

func CreateFileWithDirs(path string) (*os.File, error)

func JsonBytesToYamlBytes

func JsonBytesToYamlBytes(b []byte) ([]byte, error)

func MapToUrlValues

func MapToUrlValues(data map[string]string) url.Values

func MarshalViaJSONToYAML

func MarshalViaJSONToYAML(v interface{}) ([]byte, error)

func PrintCSV

func PrintCSV(obj interface{}) error

func PrintInfo

func PrintInfo()

PrintInfo print Info

func PrintJSON

func PrintJSON(obj interface{}) error

func PrintYAML

func PrintYAML(obj interface{}) error

func ReadBytes

func ReadBytes(body io.ReadCloser) ([]byte, error)

func ReadJSON

func ReadJSON(body io.ReadCloser, v interface{}) error

func SetLogLevel

func SetLogLevel(loglevelString string)

SetLogLevel sets the log level for logrus by string; possible values are debug, error, fatal, panic, info, trace

func YamlBytesToJSONBytes

func YamlBytesToJSONBytes(b []byte) ([]byte, error)

func YamlToMap

func YamlToMap(y []byte) (map[string]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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