util

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrainResponse

func DrainResponse(r *http.Response)

func FormatMap

func FormatMap(format string, m map[string]interface{}) string

FormatMap formats the string with the map ( the key name of map must be combination of a-zA-z0-9 and . and _ ) eg: format: "this namespace is %namespace"

map: 	{"namespace": "ns"}
return: "this namespace is ns"

func SignalHandler

func SignalHandler() <-chan struct{}

SignalHandler setups a signal hander to gracefully exit

func StructToFlatMap

func StructToFlatMap(input interface{}, prefix, sep string) map[string]interface{}

StructToFlatMap converts input to flat map

Types

This section is empty.

Jump to

Keyboard shortcuts

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