diff options
| author | Taichi Maeda <taichi.maeda.up@gmail.com> | 2025-11-18 19:05:12 +0900 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-11-20 13:02:54 -0800 |
| commit | 5afe237d65e21c3fd028897d29d78e55602ab535 (patch) | |
| tree | a82f52ea633baea60274180c9bbdcb2acf346da6 /src | |
| parent | c1b7112af8331d37e33be521d2d8baa552945971 (diff) | |
| download | go-5afe237d65e21c3fd028897d29d78e55602ab535.tar.xz | |
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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/mime/type.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mime/type.go b/src/mime/type.go index ac7b0447da..58cc22fdb0 100644 --- a/src/mime/type.go +++ b/src/mime/type.go @@ -156,6 +156,7 @@ func initMime() { // /etc/mime.types // /etc/apache2/mime.types // /etc/apache/mime.types +// /etc/httpd/conf/mime.types // // 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 // ".html". When typ has no associated extensions, ExtensionsByType returns an // 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) { justType, _, err := ParseMediaType(typ) if err != nil { |
