From ffae2e3002caf471eeb8c367f2656eddca8b3194 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 6 Dec 2025 12:54:07 -0500 Subject: [PATCH] Export global.RootLength --- global/1globals.go | 2 +- global/getPath_UNIX.go | 2 +- global/getPath_WIN.go | 2 +- go.mod | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/global/1globals.go b/global/1globals.go index f5a2da9..ca28a9c 100644 --- a/global/1globals.go +++ b/global/1globals.go @@ -4,7 +4,7 @@ type ByteInputFetcher func(prompt string) []byte var ( GetPassword ByteInputFetcher // Clients should set this to a function that fetches hidden input from the user - rootLength = len(EntryRoot) // length of global.EntryRoot string + RootLength = len(EntryRoot) // length of global.EntryRoot string ) const ( diff --git a/global/getPath_UNIX.go b/global/getPath_UNIX.go index 1342986..cb307cf 100644 --- a/global/getPath_UNIX.go +++ b/global/getPath_UNIX.go @@ -9,5 +9,5 @@ func GetRealPath(vanityPath string) string { // GetVanityPath returns a vanityPath given a realPath func GetVanityPath(realPath string) string { - return realPath[rootLength:] + return realPath[RootLength:] } diff --git a/global/getPath_WIN.go b/global/getPath_WIN.go index d66fcf9..0a76468 100644 --- a/global/getPath_WIN.go +++ b/global/getPath_WIN.go @@ -13,5 +13,5 @@ func GetRealPath(vanityPath string) string { // GetVanityPath returns a vanityPath given a realPath func GetVanityPath(realPath string) string { - return strings.ReplaceAll(realPath[rootLength:], "\\", "/") + return strings.ReplaceAll(realPath[RootLength:], "\\", "/") } diff --git a/go.mod b/go.mod index 8cba24d..f6f02a7 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/rwinkhart/libmutton -go 1.25.4 +go 1.25.5 require ( github.com/pkg/sftp v1.13.10