Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func main() {
- var id int
- var ids []int
- var count int
- f, err := os.Create("xyz.txt")
- check(err)
- defer f.Close()
- for j := 0; j < 5; j++ {
- count = rand.Intn(100)
- for i := 0; i < product_count; i++ {
- id = rand.Intn(1000)
- ids = append(product_ids, product_id)
- }
- n2, err := f.Write(ids)
- check(err)
- fmt.Printf("wrote %d bytesn", n2)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement