Documentation ¶
Index ¶
- Variables
- func AsBool(unknown interface{}) (bool, error)
- func AsFloat64(unknown interface{}) (float64, error)
- func AsInt64(unknown interface{}) (int64, error)
- func AsMapOfStringsIntefaces(unknown interface{}) (map[string]interface{}, error)
- func AsSliceOfStrings(unknown interface{}) ([]string, error)
- func AsString(unknown interface{}) (string, error)
- func Contains(arr []string, str string) bool
- func DereferenceBool(b *bool) bool
- func DereferenceFloat64(f *float64) float64
- func DereferenceInt(i *int) int
- func DereferenceInt64(i *int64) int64
- func DereferenceString(s *string) string
- func IsZeroOfUnderlyingType(x interface{}) bool
- func ToStructFromMapStringInterface(m map[string]interface{}, str interface{}) error
Constants ¶
This section is empty.
Variables ¶
var ColorInfo = color.New(color.FgGreen).SprintFunc()
ColorInfo returns a new function that returns info-colorized (green) strings for the given arguments with fmt.Sprint().
Functions ¶
func AsMapOfStringsIntefaces ¶
AsMapOfStringsIntefaces attempts to convert unknown to a map[string]interface{}
func AsSliceOfStrings ¶
AsSliceOfStrings attempts to convert unknown to a slice of strings
func DereferenceBool ¶
DereferenceBool will return the bool value or the empty value for bool
func DereferenceFloat64 ¶
DereferenceFloat64 will return the float64 value or the empty value for float64
func DereferenceInt ¶
DereferenceInt will return the int value or the empty value for int
func DereferenceInt64 ¶
DereferenceInt64 will return the int value or the empty value for i
func DereferenceString ¶
DereferenceString will return the string value or the empty value for string
func IsZeroOfUnderlyingType ¶
func IsZeroOfUnderlyingType(x interface{}) bool
IsZeroOfUnderlyingType checks if the underlying type of the interface is set to it's zero value
func ToStructFromMapStringInterface ¶
ToStructFromMapStringInterface marshals a generic map[string]interface{} to a struct by marshalling to json and back Use JSON for the marshalling instead of YAML because sub-structs will get marshalled into map[interface{}]interface{} when using YAML, but map[string]interface{} when using JSON and vault libraries can't handle map[interface{}]interface{}
Types ¶
This section is empty.