Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe it is because the simple way requires knowledge of packages, which are covered later perhaps, since many tutorials go straight to "go run helloworld.go"


You don't need to cover packages. You could just say this: the standard convention is that the source for each Go program lives in its own directory, and it starts running the code in a file called `main.go`. To run the Go program in the current directory, run `go run .`

Introducing the concept of "packages", and the fact that the directory is a package, can be deferred until later.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: