go2

package
v0.0.0-...-55b3812 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2023 License: ISC Imports: 3 Imported by: 44

Documentation

Overview

Package go2 contains general utility helpers that should've been in Go. Maybe they'll be in Go 2.0.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](els []T, el T) bool

func Filter

func Filter[T any](els []T, fn func(T) bool) []T

func IntMax

func IntMax(x, y int) int

func IntMin

func IntMin(x, y int) int

func Max

func Max[T constraints.Ordered](a, b T) T

func Min

func Min[T constraints.Ordered](a, b T) T

func Pointer

func Pointer[T any](v T) *T

func StringToIntHash

func StringToIntHash(s string) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL