Go语言学习之mime包(the way to go)

比眉伴天荒 2022-06-10 09:50 332阅读 0赞

生命不止,继续 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

  1. func AddExtensionType(ext, typ string) error

发表评论

表情:
评论列表 (有 0 条评论,332人围观)

还没有评论,来说两句吧...

相关阅读