I was rather surprised that io.EOF
is not declared a constant, but an exported variable. Although not a big deal, this subjects it to unintended reassignment. Why not declare it a constant? Is this because constants in Go are rather unusual?
Indeed, Go is very specific when it comes to constants. The language does not offer freezing a variable into something immutable. It won't compile: https://play.golang.org/p/s_HjtJl0QP6.