def encode.if
import bend-kit-multipart@0.3.0.0/multipart.bend as Multipartimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
283def encode.if(ok: Bool, +b: String, parts: List<&1, Part>) -> Result<&1, &1, String, Bytes.Bytes>:
284 match ok:
285 case False{}:
286 Fail{"multipart: boundary must be 1 to 70 RFC 2046 bchars, not ending in a space"}
287 case True{}:
288 enc.go(parts, b, "\r\n--" ++ b, Done{Nil{}})