We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac87f78 commit a703cc6Copy full SHA for a703cc6
pairtree.go
@@ -78,6 +78,7 @@ func charDecode(s string) string {
78
return s
79
}
80
81
+// Encode takes a string and encodes it as a pairtree path.
82
func Encode(src string) string {
83
s := charEncode(src)
84
results := []string{}
@@ -94,6 +95,7 @@ func Encode(src string) string {
94
95
return strings.Join(results, string(os.PathSeparator))
96
97
98
+// Decode takes a pairtree path and returns the original string representation
99
func Decode(src string) string {
100
parts := strings.Split(src, string(os.PathSeparator))
101
0 commit comments