mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
mime: add missing path for mime types in godoc
ExtensionsByType was missing godoc for a mime.types file path that was added in CL 236677. Change-Id: Ia04fa90f01490fc1f063c4905aea65d240935cab Reviewed-on: https://go-review.googlesource.com/c/go/+/721580 Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Auto-Submit: Sean Liao <sean@liao.dev> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
c1b7112af8
commit
5afe237d65
1 changed files with 14 additions and 0 deletions
|
|
@ -156,6 +156,7 @@ func initMime() {
|
||||||
// /etc/mime.types
|
// /etc/mime.types
|
||||||
// /etc/apache2/mime.types
|
// /etc/apache2/mime.types
|
||||||
// /etc/apache/mime.types
|
// /etc/apache/mime.types
|
||||||
|
// /etc/httpd/conf/mime.types
|
||||||
//
|
//
|
||||||
// On Windows, MIME types are extracted from the registry.
|
// On Windows, MIME types are extracted from the registry.
|
||||||
//
|
//
|
||||||
|
|
@ -197,6 +198,19 @@ func TypeByExtension(ext string) string {
|
||||||
// type typ. The returned extensions will each begin with a leading dot, as in
|
// type typ. The returned extensions will each begin with a leading dot, as in
|
||||||
// ".html". When typ has no associated extensions, ExtensionsByType returns an
|
// ".html". When typ has no associated extensions, ExtensionsByType returns an
|
||||||
// nil slice.
|
// nil slice.
|
||||||
|
//
|
||||||
|
// The built-in table is small but on unix it is augmented by the local
|
||||||
|
// system's MIME-info database or mime.types file(s) if available under one or
|
||||||
|
// more of these names:
|
||||||
|
//
|
||||||
|
// /usr/local/share/mime/globs2
|
||||||
|
// /usr/share/mime/globs2
|
||||||
|
// /etc/mime.types
|
||||||
|
// /etc/apache2/mime.types
|
||||||
|
// /etc/apache/mime.types
|
||||||
|
// /etc/httpd/conf/mime.types
|
||||||
|
//
|
||||||
|
// On Windows, extensions are extracted from the registry.
|
||||||
func ExtensionsByType(typ string) ([]string, error) {
|
func ExtensionsByType(typ string) ([]string, error) {
|
||||||
justType, _, err := ParseMediaType(typ)
|
justType, _, err := ParseMediaType(typ)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue