Refactor app initialization
Initial description taken from !1021 (closed):
We should refactorize the way how application is initialized.
Several reasons for this:
- Move binaries sources (
main
package) tocmd/[binnary-name]/main.go
, which is the pattern commonly used for Go apps, - Move code parts common for
gitlab-runner/main.go
andgitlab-runner-helper/main.go
to one place:app
package. - Move some code related to application initialization from
helpers/cli
to theapp
package. This is a next step in decomposing the big, messedhelpers/
package in more structured and domain oriented parts. - Prepare a hooks mechanism in
app
package, to simplify the initialization of apps.