gen

command module
v0.0.0-...-01e30c3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

README

Install

go get -u github.com/brother-big/gen

Example

gen map IntString int string
type IntStringMap map[int]string

func NewIntStringMap() IntStringMap {
	return make(map[int]string)
}

func (m IntStringMap) Set(key int, value string) {
	m[key] = value
}

func (m IntStringMap) Get(key int) (value string, ok bool) {
	value, ok = m[key]
	return
}

gen map StrBytes string []byte
type StrBytesMap map[string][]byte

func NewStrBytesMap() StrBytesMap {
	return make(map[string][]byte)
}

func (m StrBytesMap) Set(key string, value []byte) {
	m[key] = value
}

func (m StrBytesMap) Get(key string) (value []byte, ok bool) {
	value, ok = m[key]
	return
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.

Jump to

Keyboard shortcuts

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