Skip to content

Instantly share code, notes, and snippets.

@gzmask
Created February 25, 2010 16:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gzmask/314682 to your computer and use it in GitHub Desktop.
Save gzmask/314682 to your computer and use it in GitHub Desktop.
golang strange syntax errors
package main
import "fmt"
import "os"
func main() {
file, _ := os.Open("list.txt", os.O_RDWR, 0644)
var b [40000] byte
file.Read(&b)
fmt.Print(len(&b))
fmt.Print("\n")
file.Close()
os.Exit(0)
}
40000
=========
while the file size for list.txt is 1562
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment