hashmap

package module
v0.0.0-...-4a12113 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2013 License: Apache-2.0 Imports: 5 Imported by: 0

README

go-hashmap

go-hashmap provides a way to log maps as a string of key/value pairs

package main

import (
	"fmt"
	"github.com/davidnarayan/go-hashmap"
)

func main() {
	hm := hashmap.NewHashMap()
	hm.Set("foo", "123")
	hm.Set("bar", "456")

	fmt.Println(hm)
}

This outputs:

bar="456" foo="123"

Documentation

Overview

go-hashmap provides a mechanism to log maps as a string of key/value pairs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashMap

type HashMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Key-value pairs for semantic logging

func NewHashMap

func NewHashMap() *HashMap

func (*HashMap) Contains

func (hm *HashMap) Contains(key string) bool

func (*HashMap) Get

func (hm *HashMap) Get(key string) interface{}

func (*HashMap) Set

func (hm *HashMap) Set(key string, value interface{})

func (*HashMap) SetFromMap

func (hm *HashMap) SetFromMap(m map[string]interface{})

func (*HashMap) String

func (hm *HashMap) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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