utils

package
v0.0.0-...-79eae96 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LineParseInt

func LineParseInt(lr *LineReader) (int, error)

func LineParseIntsN

func LineParseIntsN(lr *LineReader, n int) ([]int, error)

Read line and parse ints.

func NewRandNow

func NewRandNow() *rand.Rand

func NewRandSeed

func NewRandSeed(seed int64) *rand.Rand

func NewRandTime

func NewRandTime(t time.Time) *rand.Rand

func ParseIntsN

func ParseIntsN(s string, n int) ([]int, error)

func RandIntMinMax

func RandIntMinMax(r *rand.Rand, min, max int) int

Types

type LineReader

type LineReader struct {
	// contains filtered or unexported fields
}

func NewLineReader

func NewLineReader(r io.Reader) *LineReader

func (*LineReader) ReadLine

func (p *LineReader) ReadLine() (string, error)

Jump to

Keyboard shortcuts

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