|
|
|
|
|
by mutatio
4339 days ago
|
|
I was referring to Go's magic func init() Putting that in your files, let's say: db.go func init() => handle global DB's...
templates.go func init() => handle HTML templates...
settings.go func init() => load some settings...
All fired automatically prior to your applications main() entry point WITHOUT needing to pollute main() with initDB(); initTemplates(); initSettings() etc. etc. |
|