go-arbitrary/t_regularfile.go

19 lines
221 B
Go
Raw Normal View History

2022-12-14 13:30:29 +00:00
package arbitrary
import (
"io/fs"
)
func (arb T) RegularFile() fs.File {
var fns [](func()fs.File) = [](func()fs.File){
arb.TextFile,
arb.HTMLFile,
}
fn := fns[arb.randomness.Intn(len(fns))]
return fn()
}