summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--textproto/types.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/textproto/types.go b/textproto/types.go
index dd4c48d..a4b438a 100644
--- a/textproto/types.go
+++ b/textproto/types.go
@@ -84,6 +84,10 @@ func (m Mode) String() string {
return fmt.Sprintf("%06o", m)
}
+func (m Mode) GoString() string {
+ return fmt.Sprintf("%07o", m)
+}
+
func PathEscape(path Path) string {
if strings.HasPrefix(string(path), "\"") || strings.ContainsRune(string(path), '\n') {
return "\"" + strings.Replace(strings.Replace(strings.Replace(string(path), "\\", "\\\\", -1), "\"", "\\\"", -1), "\n", "\\n", -1) + "\""