You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore(cmd): refactored main program
Another baby step forward:
* refactored error and flags handling in main program
* this improves testability, so we add a unit test for main
There is still some room for improvement (coverage, I/O injection for
better control in a test environment). Essential options in main
are covered by tests.
Signed-off-by: Frédéric BIDON <fredbi@yahoo.com>
* addressed typos & other hiccups detected by copilot.
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
---------
Signed-off-by: Frédéric BIDON <fredbi@yahoo.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
{"Time":"2025-11-24T23:37:16.673781823+01:00","Action":"output","Package":"github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter","Test":"TestExecute","Output":"=== RUN TestExecute\n"}
{"Time":"2025-11-24T23:37:16.673806229+01:00","Action":"output","Package":"github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter","Test":"TestExecute/with_no_flags","Output":"=== RUN TestExecute/with_no_flags\n"}
{"Time":"2025-11-24T23:37:16.673827269+01:00","Action":"output","Package":"github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter","Test":"TestExecute/with_no_flags/should_error_because_no_output_file_is_provided","Output":"=== RUN TestExecute/with_no_flags/should_error_because_no_output_file_is_provided\n"}
{"Time":"2025-11-24T23:37:16.674036664+01:00","Action":"output","Package":"github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter","Test":"TestExecute/with_no_flags/should_error_because_no_report_data_is_provided","Output":"=== RUN TestExecute/with_no_flags/should_error_because_no_report_data_is_provided\n"}
0 commit comments