Skip to content

Commit abb91fe

Browse files
committed
#72 Initialize []sys.NotDecoded and the partstable using make()
1 parent 848d56d commit abb91fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rfc2045/make-multipart-flat.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ func levelout(argv0 string, argv1 *string) ([][3]string, []sis.NotDecoded) {
9292
if argv0 == "" || argv1 == nil || *argv1 == "" { return nil, nil }
9393
boundary01 := Boundary(argv0, 0); if boundary01 == "" { return nil, nil }
9494
multiparts := strings.Split(*argv1, boundary01 + "\n")
95-
partstable := [][3]string{}
96-
notdecoded := []sis.NotDecoded{}
95+
partstable := make([][3]string, 0, 4)
96+
notdecoded := make([]sis.NotDecoded, 0, 2)
9797

9898
// Remove empty or useless preamble and epilogue of multipart/* block
9999
if len(multiparts[0]) < 8 { multiparts = multiparts[1:] }

0 commit comments

Comments
 (0)