refactor(tools): remove unused validatePath wrapper

This commit is contained in:
Hoshina
2026-03-14 12:08:11 +08:00
parent 1bc05e8392
commit 345452fba8
-5
View File
@@ -20,11 +20,6 @@ import (
const MaxReadFileSize = 64 * 1024 // 64KB limit to avoid context overflow
// validatePath ensures the given path is within the workspace if restrict is true.
func validatePath(path, workspace string, restrict bool) (string, error) {
return validatePathWithAllowPaths(path, workspace, restrict, nil)
}
func validatePathWithAllowPaths(path, workspace string, restrict bool, patterns []*regexp.Regexp) (string, error) {
if workspace == "" {
return path, fmt.Errorf("workspace is not defined")