Skip to content

fix(errors): implement filterErr with common adb stderr patterns - #3

Merged
taigrr merged 1 commit into
masterfrom
cd/cleanup-filter-err-and-deps
Apr 12, 2026
Merged

fix(errors): implement filterErr with common adb stderr patterns#3
taigrr merged 1 commit into
masterfrom
cd/cleanup-filter-err-and-deps

Conversation

@taigrr

@taigrr taigrr commented Apr 8, 2026

Copy link
Copy Markdown
Owner

Changes

  • Implement filterErr — previously a stub TODO. Now detects common adb stderr patterns and returns typed sentinel errors:
    • ErrDeviceNotFound — device not found
    • ErrDeviceOffline — device offline
    • ErrDeviceUnauthorized — device unauthorized (USB debugging not approved)
    • ErrConnectionRefused — daemon connection refused
    • ErrMoreThanOneDevice — multiple devices without serial specified
  • Remove log.Printf in CaptureSequence (was marked TODO for removal)
  • Fix ConnString — use local variable instead of mutating value receiver field
  • Update go directive to 1.26.2
  • Update README — check implemented features, fix intro typo, add root/keyevent/getevent to supported functions list
  • Expand tests for all new filterErr error patterns

All tests pass with -race, staticcheck clean.

- Implement filterErr to detect device-not-found, offline, unauthorized,
  connection-refused, and multiple-device errors from stderr output
- Add ErrDeviceNotFound, ErrDeviceOffline, ErrDeviceUnauthorized,
  ErrConnectionRefused, ErrMoreThanOneDevice sentinel errors
- Remove log.Printf in CaptureSequence (was marked TODO for removal)
- Fix ConnString to use local variable instead of mutating value receiver
- Update go directive to 1.26.2
- Update README: check implemented features, fix intro typo, add
  root/keyevent/getevent to supported functions list
- Expand filterErr tests for all new error patterns
@taigrr
taigrr merged commit 1cb8e59 into master Apr 12, 2026
1 check passed
@taigrr
taigrr deleted the cd/cleanup-filter-err-and-deps branch April 27, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant