docs(common): sync ParseResourceURL doc comment with new URL prefixes#1136
docs(common): sync ParseResourceURL doc comment with new URL prefixes#1136Wang-Yeah623 wants to merge 1 commit into
Conversation
larksuite#1106 added three new URL prefixes to urlPathToType -- /drive/file/, /drive/shr/, /chat/drive/ -- so ParseResourceURL now recognizes them in practice, but the godoc comment above the function still listed only the original nine patterns. The /bitable/ alias of /base/ has also been absent from the comment since it was added. AI agents and contributors reading the godoc were seeing an outdated supported-pattern list. Tests in resource_url_test.go already cover all four undocumented prefixes, so this is a doc-only sync -- no behavior change.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesDocumentation Updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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
#1106 added three new URL prefixes to
urlPathToType(/drive/file/,/drive/shr/,/chat/drive/), soParseResourceURLrecognizes them in practice — but the godoc comment above the function still listed only the original nine patterns. The/bitable/alias of/base/has also been absent from the comment.AI agents and contributors reading the godoc were seeing an outdated supported-pattern list. This PR syncs the comment with the actual code.
Changes
shortcuts/common/resource_url.go: add the four missing entries (/bitable/,/drive/file/,/drive/shr/,/chat/drive/) to the godoc patterns list. Placement follows the order of the matching entries inurlPathToType. +4 lines, no behavior change.Test Plan
go test ./shortcuts/common/ -run TestParseResourceURL— passes (existing table-driven tests already cover all four prefixes, including doubao-host variants)gofmt -l shortcuts/common/resource_url.go— cleanRelated Issues
Summary by CodeRabbit