How do I truncate and completely rewrite a file without having leading zeros?
When truncating a file it seems to be adding additional zero bytes to the start:
configFile, err := os.OpenFile("./version.json", os.O_RDWR, 0666)
defer configFile.Close()
check(err)
//some actions