Skip to content

Commit a703cc6

Browse files
committed
added some comments for the Encode(), Decode() funcs
1 parent ac87f78 commit a703cc6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pairtree.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func charDecode(s string) string {
7878
return s
7979
}
8080

81+
// Encode takes a string and encodes it as a pairtree path.
8182
func Encode(src string) string {
8283
s := charEncode(src)
8384
results := []string{}
@@ -94,6 +95,7 @@ func Encode(src string) string {
9495
return strings.Join(results, string(os.PathSeparator))
9596
}
9697

98+
// Decode takes a pairtree path and returns the original string representation
9799
func Decode(src string) string {
98100
parts := strings.Split(src, string(os.PathSeparator))
99101
results := []string{}

0 commit comments

Comments
 (0)