jhillyerd / enmime

MIME mail encoding and decoding package for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate refactor of header.go:parseMediaType

jhillyerd opened this issue · comments

The return signature of header.go:parseMediaType is getting long.

Investigate converting the return to a struct, and possibly moving a lot of the "bad content type" parsing code into methods on that struct. That would help keep the detect.go more readable.

header.go and detect.go have seen significant refactors since then, and given the length of the return signature is only one more than Go's ParseMediaType, should not be a concern.