- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for osInitMime (0.14 sec)
-
src/mime/type_plan9.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package mime import ( "bufio" "os" "strings" ) func init() { osInitMime = initMimePlan9 } func initMimePlan9() { for _, filename := range typeFiles { loadMimeFile(filename) } } var typeFiles = []string{ "/sys/lib/mimetype", }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun May 15 19:56:08 UTC 2016 - 1K bytes - Viewed (0) -
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_windows.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package mime import ( "internal/syscall/windows/registry" ) func init() { osInitMime = initMimeWindows } func initMimeWindows() { names, err := registry.CLASSES_ROOT.ReadSubKeyNames() if err != nil { return } for _, name := range names {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 28 20:07:28 UTC 2022 - 1.2K 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)