maps

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

package maps contains utilities to handle common map operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIString

func GetIString(m map[string]interface{}, key string) (string, bool)

IMapGetString gets a string out of a map of interfaces keyed by a string. Returns the string and true if found, or an empty string and false if not, or the found item was not a string.

func GetJsonFloat

func GetJsonFloat(m map[string]interface{}, key string) (float64, bool)

IMapGetJsonFloat gets a float64 out of a map of interfaces that were unmarshalled from json. Json unmarshalling creates json numbers, and these have to be coerced into integers or floats. Returns an int and true if found, and a zero and false if not, or the found item was not a coercible number.

func GetJsonInt

func GetJsonInt(m map[string]interface{}, key string) (int, bool)

IMapGetJsonInt gets an integer out of a map of interfaces that were unmarshalled from json. Json unmarshalling creates json numbers, and these have to be coerced into integers or floats. Returns an int and true if found, and a zero and false if not, or the found item was not a coercible number.

Types

This section is empty.

Jump to

Keyboard shortcuts

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