Documentation
¶
Overview ¶
Package generics Time : 2022/8/11 09:29 Author : xushiyin contact : yuqingxushiyin@gmail.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SumIntsOrFloats ¶
func SumIntsOrFloats[K comparable, V int64 | float64](m map[K]V) V
SumIntsOrFloats sums the values of map m. It supports both int64 and float64 as types for map values.
func SumNumbers ¶
func SumNumbers[K comparable, V Number](m map[K]V) V
SumNumbers sums the values of map m. Its supports both integers and floats as map values.
Types ¶
Click to show internal directories.
Click to hide internal directories.