Currently I cannot call sliceutils.Sum() with user-defined type. To fix this issue I suggest using constraints package. Alternatively, if You do not want to import additional module, 'number' interface can be fixed by using '~'
type numbers interface {
~int | ...
}
Currently I cannot call sliceutils.Sum() with user-defined type. To fix this issue I suggest using constraints package. Alternatively, if You do not want to import additional module, 'number' interface can be fixed by using '~' type numbers interface { ~int | ... }
Have a nice day!