- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for osInitMime (0.83 sec)
-
src/mime/type.go
".webp": "image/webp", ".xml": "text/xml; charset=utf-8", } var once sync.Once // guards initMime var testInitMime, osInitMime func() func initMime() { if fn := testInitMime; fn != nil { fn() } else { setMimeTypes(builtinTypesLower, builtinTypesLower) osInitMime() } } // TypeByExtension returns the MIME type associated with the file extension ext.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5K bytes - Viewed (0) -
src/mime/type_unix.go
// license that can be found in the LICENSE file. //go:build unix || (js && wasm) || wasip1 package mime import ( "bufio" "os" "strings" ) func init() { osInitMime = initMimeUnix } // See https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-0.21.html // for the FreeDesktop Shared MIME-info Database specification. var mimeGlobs = []string{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 11 20:56:32 UTC 2023 - 3K bytes - Viewed (0) -
src/mime/type_test.go
} } }) }) } } func TestExtensionsByType2(t *testing.T) { cleanup := setMimeInit(func() { clearMimeTypes() // Initialize built-in types like in type.go before osInitMime. setMimeTypes(builtinTypesLower, builtinTypesLower) }) defer cleanup() tests := []struct { typ string want []string }{ {typ: "image/jpeg", want: []string{".jpeg", ".jpg"}}, }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 08 21:09:03 UTC 2022 - 4.9K bytes - Viewed (0)