1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
8 "internal/syscall/windows/registry"
12 osInitMime
= initMimeWindows
15 func initMimeWindows() {
16 names
, err
:= registry
.CLASSES_ROOT
.ReadSubKeyNames(-1)
20 for _
, name
:= range names
{
21 if len(name
) < 2 || name
[0] != '.' { // looking for extensions only
24 k
, err
:= registry
.OpenKey(registry
.CLASSES_ROOT
, name
, registry
.READ
)
28 v
, _
, err
:= k
.GetStringValue("Content Type")
33 setExtensionType(name
, v
)
37 func initMimeForTests() map[string]string {
38 return map[string]string{