Skip to content

Instantly share code, notes, and snippets.

View prathabk's full-sized avatar

Prathab Kali prathabk

View GitHub Profile
@prathabk
prathabk / err.go
Created September 8, 2020 13:43
Decorating Go Error
package main
import (
"fmt"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
"strings"
)
func main() {
@prathabk
prathabk / MultiKeyHashMap
Created January 10, 2012 07:42
Two Level Key Hash Map (Java)
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* MultiKeyHashMap provides to store values with two level hierarchy of keys,
* super key (K1) and sub key (K2). The objects are inserted using super and sub keys.
* It is not mandatory to use both keys as hierarchy, user can use two keys to store
* the values and use either of the key to retrieve it.