github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/io0_native.gno (about) 1 package main 2 3 import ( 4 "crypto/rand" 5 "fmt" 6 "io" 7 ) 8 9 func main() { 10 var buf [16]byte 11 fmt.Println(buf) 12 io.ReadFull(rand.Reader, buf[:]) 13 fmt.Println(buf) 14 } 15 16 // Output: 17 // [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] 18 // [100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115]