Movatterモバイル変換


[0]ホーム

URL:


rands

package
v1.92.3Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:4Imported by:7

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package rands contains utility functions for randomness.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcHexString

func HexString(nint)string

HexString returns a string of n cryptographically random lowercasehex characters.

That is, HexString(3) returns something like "0fc", containing 12bits of randomness.

funcIntNadded inv1.68.0

func IntN(seeduint64, nint)int

IntN is like rand.IntN, but it is seeded on the stack and does not allocateor lock any RNG state.

funcPermadded inv1.60.0

func Perm(seeduint64, nint) []int

Perm is like rand.Perm, but it is seeded on the stack and does not allocateor lock any RNG state.

funcShuffleadded inv1.60.0

func Shuffle[Tany](seeduint64, data []T)

Shuffle is like rand.Shuffle, but it does not allocate or lock any RNG state.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp