- Remove fmt from updater.go, service.go, http_client.go, cmd.go, github.go, generic_http.go; replace with string concat, coreerr.E, cli.Print
- Remove strings from updater.go (inline byte comparisons) and service.go (inline helpers)
- Replace fmt.Sprintf in error paths with string concatenation throughout
- Add cli.Print for all stdout output in updater.go (CheckForUpdates, CheckOnly, etc.)
- Fix service_examples_test.go: restore original CheckForUpdates instead of setting nil
- Test naming: all test files now follow TestFile_Function_{Good,Bad,Ugly} with all three variants mandatory
- Comments: replace prose descriptions with usage-example style on all exported functions
- Remaining banned: strings/encoding/json in github.go and generic_http.go (no Core replacement in direct deps); os/os.exec in platform files (syscall-level, unavoidable without go-process)
Co-Authored-By: Virgil <virgil@lethean.io>
Replace all remaining fmt.Errorf and errors.New calls in production code
with coreerr.E() for consistent error handling with context information.
This improves error messages by including the function context where
errors occur.
Modified files:
- github.go: 6 fmt.Errorf calls
- generic_http.go: 5 fmt.Errorf calls
- updater.go: 6 fmt.Errorf calls
- service.go: 4 fmt.Errorf calls
- github_test.go: Updated test expectation for new error format
All tests pass with the new error format.
Co-Authored-By: Virgil <virgil@lethean.io>