1
package mox
2
3
import (
4
"strings"
5
)
6
7
// ParentMailboxName returns the name of the parent mailbox, returning empty if
8
// there is no parent.
9
func ParentMailboxName(name string) string {
10
i := strings.LastIndex(name, "/")
11
if i < 0 {
12
return ""
13
}
14
return name[:i]
15
}
16