Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintGeneric ¶
PrintGeneric returns any type as string. The string is enriched with the required Kineteco legal information.
func PrintSlice ¶
func PrintSlice[T Energy](t []T)
PrintSlice prints all Energy items in t to stdout, note the generic is
using T Energy rather than any for a more specific or constrained generic
func PrintSlice2 ¶
func PrintSlice2[T Energy, S ~[]T](t S)
PrintSlice2 uses a second constraint to replace []T as a slice of all items
that could be T (the ~ operator). What this means is if we had say type myString string and string then the constraint ~string would also match myString because it approximates string
Types ¶
type Complex ¶
type Complex interface { ~complex64 | ~complex128 }
Complex is another type-set interface but the use of ~ allows automatic extensibility,
should additional complex types be added to Go in the future
type Number ¶
type Number interface { constraints.Float | constraints.Integer }
Click to show internal directories.
Click to hide internal directories.