Files
go-enum/generator/example_1.18_test.go
Alex Bice 7e2e8bcd62 Change generated binary to 1.18 (#91)
* Update to support go 1.18 stuff

* add new tests

* change release to use 1.18

* fix older versions

* drop support of 1.13

* up the code coverage
2022-03-20 08:20:50 -07:00

23 lines
391 B
Go

//go:build go1.18
// +build go1.18
package generator
// SumIntsOrFloats sums the values of map m. It supports both int64 and float64
// as types for map values.
func SumIntsOrFloats[K comparable, V int64 | float64](m map[K]V) V {
var s V
for _, v := range m {
s += v
}
return s
}
// ChangeType is a type of change detected.
/* ENUM(
Create
Update
Delete
) */
type ChangeType int