From 3e9488909bb43b0bcb098c4e73e3e82f34cb7a35 Mon Sep 17 00:00:00 2001 From: Wang-Yeah623 Date: Wed, 27 May 2026 16:25:06 +0800 Subject: [PATCH] docs(common): sync ParseResourceURL doc comment with new URL prefixes #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. --- shortcuts/common/resource_url.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shortcuts/common/resource_url.go b/shortcuts/common/resource_url.go index 29ec31c10..2d756ec68 100644 --- a/shortcuts/common/resource_url.go +++ b/shortcuts/common/resource_url.go @@ -96,9 +96,13 @@ var urlPathToType = []struct { // /doc/TOKEN -> {Type: "doc", Token: TOKEN} // /sheets/TOKEN -> {Type: "sheet", Token: TOKEN} // /base/TOKEN -> {Type: "bitable", Token: TOKEN} +// /bitable/TOKEN -> {Type: "bitable", Token: TOKEN} (alias of /base/) // /wiki/TOKEN -> {Type: "wiki", Token: TOKEN} // /file/TOKEN -> {Type: "file", Token: TOKEN} // /drive/folder/TOKEN -> {Type: "folder", Token: TOKEN} +// /drive/file/TOKEN -> {Type: "file", Token: TOKEN} +// /drive/shr/TOKEN -> {Type: "folder", Token: TOKEN} +// /chat/drive/TOKEN -> {Type: "folder", Token: TOKEN} // /mindnote/TOKEN -> {Type: "mindnote", Token: TOKEN} // /slides/TOKEN -> {Type: "slides", Token: TOKEN} //