Clarify main and report errors

Clarify main and report errors

Using Cobra's RunE in root.go allows to execute() with error returns It gives the oppoortunity to propagate the main.go context.Context towards the RunE func, adapting cmd.Execute()

In main.go, we can then report errors and such, in a more structured way, using a (dedicated) zerolog.Logger in interactive, and the service Logger when available. This log routing logic is the report() func intentionally unexported to be service/main package reserved.

Small fix attached in respect to millisecond logging, which was not fed the sub-second decimals until now.

Edited by Alberic Corniere

Merge request reports

Loading