Documentation ¶
Index ¶
- Constants
- func Abs[T constraints.Signed](x T) T
- func CharToLower(c byte) byte
- func CharToUpper(c byte) byte
- func Contains(haystack []string, needle string) bool
- func Gcd(x, y int) int
- func MapFindMax(m interface{}) interface{}
- func MapFindMin(m interface{}) interface{}
- func Max[T constraints.Ordered](a, b T) T
- func Min[T constraints.Ordered](a, b T) T
- func MustAtoi(s string) int
- func MustParseToStruct(re *regexp.Regexp, input string, target interface{})
- func PanicOnErr(err error)
- func ParseToStruct(re *regexp.Regexp, input string, target interface{}) bool
- func Readfile(day int) string
- func Sign[T constraints.Signed](x T) int
- func SliceMinMax[T constraints.Ordered](slice []T) (*T, *T)
Constants ¶
View Source
const MaxInt = int(^uint(0) >> 1)
View Source
const MinInt = ^MaxInt
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
func Abs[T constraints.Signed](x T) T
func CharToLower ¶
func CharToUpper ¶
func MapFindMax ¶
func MapFindMax(m interface{}) interface{}
Returns key from map[T]int which has the max value
func MapFindMin ¶
func MapFindMin(m interface{}) interface{}
Returns key from map[T]int which has the min value
func Max ¶
func Max[T constraints.Ordered](a, b T) T
func Min ¶
func Min[T constraints.Ordered](a, b T) T
func MustParseToStruct ¶
func PanicOnErr ¶
func PanicOnErr(err error)
func Sign ¶
func Sign[T constraints.Signed](x T) int
func SliceMinMax ¶
func SliceMinMax[T constraints.Ordered](slice []T) (*T, *T)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.