package main
import (
"os"
"io/ioutil"
)
func main() {
f, _ := os.Open("/etc/ttys")
buf, _ := ioutil.ReadAll(f)
print(string(buf))
}
Feed that to "go run". It'll work fine. Those two imports, by the way, are morally the same imports you gave .NET.It might be reasonable to argue that most files will need to import "fmt" (although the Damnable Use Requirement means you won't be importing it anywhere you don't need it), but I'm lost as to why you imported "strings", "bytes" ("strings" for raw arrays of bytes) or "bufio" (in all my Golang code only two files I have import "bufio").