aboutsummaryrefslogtreecommitdiff
path: root/src/internal/safefilepath/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/safefilepath/path.go')
-rw-r--r--src/internal/safefilepath/path.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/internal/safefilepath/path.go b/src/internal/safefilepath/path.go
deleted file mode 100644
index c2cc6ce5d4..0000000000
--- a/src/internal/safefilepath/path.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2022 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package safefilepath manipulates operating-system file paths.
-package safefilepath
-
-import (
- "errors"
- "io/fs"
-)
-
-var errInvalidPath = errors.New("invalid path")
-
-// Localize is filepath.Localize.
-//
-// It is implemented in this package to avoid a dependency cycle
-// between os and file/filepath.
-//
-// Tests for this function are in path/filepath.
-func Localize(path string) (string, error) {
- if !fs.ValidPath(path) {
- return "", errInvalidPath
- }
- return localize(path)
-}