all repos — piggy @ c2a637dc976e428beb8360bd0f74f777ea984b36

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}