1
0
mirror of https://github.com/xlab/android-go.git synced 2025-12-23 22:11:00 +02:00
Files
android-go/examples/tests/createTestAsset.go
2017-08-28 16:05:48 +02:00

21 lines
386 B
Go

// +build ignore
// This program creates a 1MB file whose bytes set to o%256, where o is the offset of the byte in the file, starting with 0.
package main
import (
"io/ioutil"
"log"
)
func main() {
var bytes = make([]byte, 1<<20)
for i := range bytes {
bytes[i] = byte(i)
}
var err = ioutil.WriteFile("assets/testAsset", bytes, 0666)
if err != nil {
log.Fatalln(err)
}
}