From 12d194708976fc6d6070eaa50366aa5b21edabaf Mon Sep 17 00:00:00 2001 From: Nicolas Simonds Date: Mon, 28 Apr 2025 15:59:02 +1000 Subject: [PATCH] chore: Export util.GetUnderlyingAndPath Relates to https://github.com/go-git/go-git/issues/1460 --- util/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/util.go b/util/util.go index 24b84fa..aa1b4e9 100644 --- a/util/util.go +++ b/util/util.go @@ -18,7 +18,7 @@ import ( // can but returns the first error it encounters. If the path does not exist, // RemoveAll returns nil (no error). func RemoveAll(fs billy.Basic, path string) error { - fs, path = getUnderlyingAndPath(fs, path) + fs, path = GetUnderlyingAndPath(fs, path) if r, ok := fs.(removerAll); ok { return r.RemoveAll(path) @@ -228,7 +228,7 @@ type underlying interface { Underlying() billy.Basic } -func getUnderlyingAndPath(fs billy.Basic, path string) (billy.Basic, string) { +func GetUnderlyingAndPath(fs billy.Basic, path string) (billy.Basic, string) { u, ok := fs.(underlying) if !ok { return fs, path