]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cypherpunks.ru/nncp/humanizer.go
Merge branch 'develop'
[nncp.git] / src / cypherpunks.ru / nncp / humanizer.go
index 06b33bd278783573e0db04579c46d0a21d062179..49b715a1c91f6c7c118196b0bf7e948c0aac4a02 100644 (file)
@@ -218,6 +218,25 @@ func (ctx *Ctx) Humanize(s string) string {
                default:
                        return s
                }
+       case "nncp-reass":
+               chunkNum, exists := sds["chunk"]
+               if exists {
+                       msg = fmt.Sprintf(
+                               "Reassembling chunked file \"%s\" (chunk %s): %s",
+                               sds["path"],
+                               chunkNum,
+                               rem,
+                       )
+               } else {
+                       msg = fmt.Sprintf(
+                               "Reassembling chunked file \"%s\": %s",
+                               sds["path"],
+                               rem,
+                       )
+               }
+               if err, exists := sds["err"]; exists {
+                       msg += ": " + err
+               }
        default:
                return s
        }