-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
If I have func init() { ... } in several different files in the same package, and I log an error from one of them, the stacktrace seems to be put at the end of the last line in the init() that is declared in the last source file (sorted alphabetically). Although I could be wrong and this could be a coincidence in my case.
According to the Go spec, what I'm doing is legal: https://golang.org/ref/spec#Package_initialization
Multiple such functions may be defined per package, even within a single source file.
Metadata
Metadata
Assignees
Labels
No labels