refactor(tools): remove unused validatePath wrapper
This commit is contained in:
parent
1bc05e8392
commit
345452fba8
1 changed files with 0 additions and 5 deletions
|
|
@ -20,11 +20,6 @@ import (
|
||||||
|
|
||||||
const MaxReadFileSize = 64 * 1024 // 64KB limit to avoid context overflow
|
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) {
|
func validatePathWithAllowPaths(path, workspace string, restrict bool, patterns []*regexp.Regexp) (string, error) {
|
||||||
if workspace == "" {
|
if workspace == "" {
|
||||||
return path, fmt.Errorf("workspace is not defined")
|
return path, fmt.Errorf("workspace is not defined")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue