Re:Show HN: Easy-to-configure Web Server in Go
by redbad on Saturday July 27, 2013 @10:07AM
(#6112918)
In a package, main or otherwise, files are purely for programmer convenience. They define import scope but are otherwise transparent to the toolchain.
Re:Show HN: Easy-to-configure Web Server in Go
by sarnowski on Saturday July 27, 2013 @05:30PM
(#6114518)
You have to have your main() in package "main" and all your files in one directory have to be in the same package. So when you want a main() and your logic in a "real" package, your have to seperate them.
(I'm more used to the Clojure namespace/filesystem symmetry, so this is somewhat new to me. I like the more shallow project tree but it's not immediately apparent where things are defined.)