Export global.RootLength

This commit is contained in:
2025-12-06 12:54:07 -05:00
parent 95a877d0b3
commit ffae2e3002
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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 (
+1 -1
View File
@@ -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:]
}
+1 -1
View File
@@ -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:], "\\", "/")
}