go-arbitrary/t.go

20 lines
243 B
Go
Raw Normal View History

2015-01-29 08:45:50 +00:00
package arbitrary
import "math/rand"
// A T is a source of arbitrary data.
type T struct {
randomness *rand.Rand
}
// New returns a new T.
func New(src rand.Source) T {
randomness := rand.New(src)
return T{randomness: randomness}
}