|
|
|
|
|
by perbu
867 days ago
|
|
I assume you mean main() and not main.go. main() is the only place where you can't return an error. In order to keep as much of the code as idiomatic as possible you just call something like run() where you can do so. In addition there is the testing aspect. You can't invoke main() from your tests. |
|