massive: move a lot of things

This commit is contained in:
Inanc Gumus
2019-04-26 21:32:20 +03:00
parent da30b109f8
commit 0547b1e320
105 changed files with 2624 additions and 192 deletions

View File

@@ -0,0 +1,32 @@
// For more tutorials: https://blog.learngoprogramming.com
//
// Copyright © 2018 Inanc Gumus
// Learn Go Programming Course
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
//
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
const path = "nums.txt"
_ = os.Remove(path)
f, _ := os.OpenFile(path,
os.O_CREATE|os.O_WRONLY,
0644)
defer f.Close()
const size = 1000000
w := bufio.NewWriterSize(f, 1<<16)
for i := 1; i <= size; i++ {
fmt.Fprintf(w, "num: %d\n", i)
}
w.Flush()
}