all repos — piggy @ ed5fd22c5fa0cb0923a3d5db1f9869a3cc61e340

Dead simple finance manager in Go, HTML and JS.

src/app/utils.go (view raw)

 1package app
 2
 3func IndexOf[T comparable](slice []T, element T) int {
 4	for i, el := range slice {
 5		if el == element {
 6			return i
 7		}
 8	}
 9	return -1
10}
11
12func (b Bookmaker) IsExchange() bool {
13	return b.DefaultCommission != 0
14}