Go语言学习之mime包(the way to go)
生命不止,继续 go go go !!!
很久之前,写过一篇文章来介绍Windows下如何获取文件的MIME:
《windows客户端开发–获取windows系统中文件的MIME》
其中,用到了叫做名为FindMimeFromData的Windows api.
所以今天介绍一下golang中为我们提供的mime package。
MIME
MIME是英文Multipurpose Internet Mail Extensions的缩写:
MIME is an Internet standard that extends the format of email to support:
Text in character sets other than ASCII
Non-text attachments: audio, video, images, application programs etc.
Message bodies with multiple parts
Header information in non-ASCII character sets
Package mime
func AddExtensionType
func AddExtensionType(ext, typ string) error
还没有评论,来说两句吧...