<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # package mime `import "mime"` mime實現了MIME的部分規定。 ## Index * [func AddExtensionType(ext, typ string) error](#AddExtensionType) * [func FormatMediaType(t string, param map[string]string) string](#FormatMediaType) * [func ParseMediaType(v string) (mediatype string, params map[string]string, err error)](#ParseMediaType) * [func TypeByExtension(ext string) string](#TypeByExtension) ## func [AddExtensionType](https://github.com/golang/go/blob/master/src/mime/type.go#L56 "View Source") ``` func AddExtensionType(ext, typ string) error ``` 函數將擴展名和mimetype建立偶聯;擴展名應以點號開始,例如".html"。 ## func [FormatMediaType](https://github.com/golang/go/blob/master/src/mime/mediatype.go#L21 "View Source") ``` func FormatMediaType(t string, param map[string]string) string ``` 函數根據[RFC 2045](http://tools.ietf.org/html/rfc2045)和?[RFC 2616](http://tools.ietf.org/html/rfc2616)的規定將媒體類型t和參數param連接為一個mime媒體類型,類型和參數都采用小寫字母。任一個參數不合法都會返回空字符串。 ## func [ParseMediaType](https://github.com/golang/go/blob/master/src/mime/mediatype.go#L101 "View Source") ``` func ParseMediaType(v string) (mediatype string, params map[string]string, err error) ``` 函數根據[RFC 1521](http://tools.ietf.org/html/rfc1521)解析一個媒體類型值以及可能的參數。媒體類型值一般應為Content-Type和Conten-Disposition頭域的值(參見[RFC 2183](http://tools.ietf.org/html/rfc2183))。成功的調用會返回小寫字母、去空格的媒體類型和一個非空的map。返回的map映射小寫字母的屬性和對應的屬性值。 ## func [TypeByExtension](https://github.com/golang/go/blob/master/src/mime/type.go#L45 "View Source") ``` func TypeByExtension(ext string) string ``` 函數返回與擴展名偶聯的MIME類型。擴展名應以點號開始,如".html"。如果擴展名未偶聯類型,函數會返回""。 內建的偶聯表很小,但在unix系統會從本地系統的一或多個mime.types文件(參加下表)進行增補。 ``` /etc/mime.types /etc/apache2/mime.types /etc/apache/mime.types ``` Windows系統的mime類型從注冊表獲取。文本類型的字符集參數默認設置為"utf-8"。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看