File: many_simplemaps.go

package info (click to toggle)
golang-github-cheekybits-genny 1.0.0-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 336 kB
  • sloc: makefile: 17; sh: 3
file content (41 lines) | stat: -rw-r--r-- 775 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// This file was automatically generated by genny.
// Any changes will be lost if this file is regenerated.
// see https://github.com/cheekybits/genny

package multipletypesets

import "log"

type IntStringMap map[int]string

func (m IntStringMap) Has(key int) bool {
	_, ok := m[key]
	return ok
}

func (m IntStringMap) Get(key int) string {
	return m[key]
}

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

type Float64BoolMap map[float64]bool

func (m Float64BoolMap) Has(key float64) bool {
	_, ok := m[key]
	return ok
}

func (m Float64BoolMap) Get(key float64) bool {
	return m[key]
}

func (m Float64BoolMap) Set(key float64, value bool) Float64BoolMap {
	log.Println(value)
	m[key] = value
	return m
}