You should use gometalinter to check your code for warnings/suggestions.
That will help you write better code and you’ll know where your code is
erroring out. I use vim-go to have this integration in my editor itself.
I ran your code against gometalinter and this is what I have.
➜ $?=0 /tmp/temp
I am running the following program:
package main
import (
"math/rand"
"os"
"gopkg.in/cheggaaa/pb.v1"
)
func random(min, max int) int {
return rand.Intn(max - min) + min
}
var data = ""
const TestDataCount = 2
func main() {
bar := pb.StartNew(TestDataCount)
f,_ := os.Create("HelloWorld.txt")
f