mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Export global.RootLength
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ type ByteInputFetcher func(prompt string) []byte
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
GetPassword ByteInputFetcher // Clients should set this to a function that fetches hidden input from the user
|
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 (
|
const (
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ func GetRealPath(vanityPath string) string {
|
|||||||
|
|
||||||
// GetVanityPath returns a vanityPath given a realPath
|
// GetVanityPath returns a vanityPath given a realPath
|
||||||
func GetVanityPath(realPath string) string {
|
func GetVanityPath(realPath string) string {
|
||||||
return realPath[rootLength:]
|
return realPath[RootLength:]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ func GetRealPath(vanityPath string) string {
|
|||||||
|
|
||||||
// GetVanityPath returns a vanityPath given a realPath
|
// GetVanityPath returns a vanityPath given a realPath
|
||||||
func GetVanityPath(realPath string) string {
|
func GetVanityPath(realPath string) string {
|
||||||
return strings.ReplaceAll(realPath[rootLength:], "\\", "/")
|
return strings.ReplaceAll(realPath[RootLength:], "\\", "/")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user