Help us shape the future of Go! Take the 2026 Go Developer Survey

util

package
v0.81.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Difference

func Difference(a, b []string) []string

Difference returns the elements in `a` that aren't in `b`.

func RandIntn added in v0.78.0

func RandIntn(n int) int

RandIntn returns a uniformly distributed int in [0, n) sourced from crypto/rand. It panics if n <= 0 or the platform randomness source fails.

func ToPtr added in v0.36.0

func ToPtr[T any](value T) *T

ToPtr returns a pointer to the given value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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