refactor: replace acarl005/stripansi with inline regex#676
Conversation
The package was used in one file (pkg/pty/ptytest/ptytest.go) for two log-stripping calls. Inline the same regex pattern from the upstream source to eliminate the direct dependency. acarl005/stripansi remains an indirect dep via skevetter/log.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR removes the external Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
acarl005/stripansiwas used in a single file (pkg/pty/ptytest/ptytest.go) for two log-stripping calls. Inlines the same regex pattern from the upstream source to eliminate the direct dependency.Note:
acarl005/stripansiremains an indirect dependency viagithub.com/skevetter/log.Changes
pkg/pty/ptytest/ptytest.go: removedstripansiimport, added package-levelansiEscaperegexp, replaced twostripansi.Strip(x)calls withansiEscape.ReplaceAllString(x, "")go.mod:acarl005/stripansidemoted from direct to indirectSummary by CodeRabbit
Chores
Refactor