Files
yaegi/stdlib/go1_22_math_rand_v2.go
Kai O'ReillyandGitHub 298524d9aa Remove unnecessary additional newlines in extract generated interface wrappers
A side effect of #1281 is that it added unnecessary additional newlines in generated interface wrappers from the `extract` tool. This PR removes those newlines from the extract tool template and updates the generated code with that change.
2024-07-17 16:58:04 +02:00

57 lines
1.8 KiB
Go

// Code generated by 'yaegi extract math/rand/v2'. DO NOT EDIT.
//go:build go1.22
// +build go1.22
package stdlib
import (
"math/rand/v2"
"reflect"
)
func init() {
Symbols["math/rand/v2/rand"] = map[string]reflect.Value{
// function, constant and variable definitions
"ExpFloat64": reflect.ValueOf(rand.ExpFloat64),
"Float32": reflect.ValueOf(rand.Float32),
"Float64": reflect.ValueOf(rand.Float64),
"Int": reflect.ValueOf(rand.Int),
"Int32": reflect.ValueOf(rand.Int32),
"Int32N": reflect.ValueOf(rand.Int32N),
"Int64": reflect.ValueOf(rand.Int64),
"Int64N": reflect.ValueOf(rand.Int64N),
"IntN": reflect.ValueOf(rand.IntN),
"New": reflect.ValueOf(rand.New),
"NewChaCha8": reflect.ValueOf(rand.NewChaCha8),
"NewPCG": reflect.ValueOf(rand.NewPCG),
"NewZipf": reflect.ValueOf(rand.NewZipf),
"NormFloat64": reflect.ValueOf(rand.NormFloat64),
"Perm": reflect.ValueOf(rand.Perm),
"Shuffle": reflect.ValueOf(rand.Shuffle),
"Uint32": reflect.ValueOf(rand.Uint32),
"Uint32N": reflect.ValueOf(rand.Uint32N),
"Uint64": reflect.ValueOf(rand.Uint64),
"Uint64N": reflect.ValueOf(rand.Uint64N),
"UintN": reflect.ValueOf(rand.UintN),
// type definitions
"ChaCha8": reflect.ValueOf((*rand.ChaCha8)(nil)),
"PCG": reflect.ValueOf((*rand.PCG)(nil)),
"Rand": reflect.ValueOf((*rand.Rand)(nil)),
"Source": reflect.ValueOf((*rand.Source)(nil)),
"Zipf": reflect.ValueOf((*rand.Zipf)(nil)),
// interface wrapper definitions
"_Source": reflect.ValueOf((*_math_rand_v2_Source)(nil)),
}
}
// _math_rand_v2_Source is an interface wrapper for Source type
type _math_rand_v2_Source struct {
IValue interface{}
WUint64 func() uint64
}
func (W _math_rand_v2_Source) Uint64() uint64 { return W.WUint64() }