From e596e8831885ad057a7f1db1391fddfd53f06431 Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Sat, 30 Sep 2023 10:38:01 -0700 Subject: path/filepath: add Localize Add the Localize function, which takes an io/fs slash-separated path and returns an operating system path. Localize returns an error if the path cannot be represented on the current platform. Replace internal/safefile.FromFS with Localize, which serves the same purpose as this function. The internal/safefile package remains separate from path/filepath to avoid a dependency cycle with the os package. Fixes #57151 Change-Id: I75c88047ddea17808276761da07bf79172c4f6fc Reviewed-on: https://go-review.googlesource.com/c/go/+/531677 LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor --- api/next/57151.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 api/next/57151.txt (limited to 'api') diff --git a/api/next/57151.txt b/api/next/57151.txt new file mode 100644 index 0000000000..5d0e34e8b7 --- /dev/null +++ b/api/next/57151.txt @@ -0,0 +1 @@ +pkg path/filepath, func Localize(string) (string, error) #57151 -- cgit v1.2.3-54-g00ecf