compiler: open code string equality
[gcc.git] / libgo / go / mime / type_unix.go
index 713e301cdf27d2a35a7a603f207f861682cd44c4..46ae5969cf3cb595e9973221eae69f9d92280655 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin dragonfly freebsd linux netbsd openbsd
+// +build aix darwin dragonfly freebsd hurd js,wasm linux nacl netbsd openbsd solaris
 
 package mime
 
@@ -12,6 +12,10 @@ import (
        "strings"
 )
 
+func init() {
+       osInitMime = initMimeUnix
+}
+
 var typeFiles = []string{
        "/etc/mime.types",
        "/etc/apache2/mime.types",
@@ -44,7 +48,7 @@ func loadMimeFile(filename string) {
        }
 }
 
-func initMime() {
+func initMimeUnix() {
        for _, filename := range typeFiles {
                loadMimeFile(filename)
        }
@@ -53,7 +57,7 @@ func initMime() {
 func initMimeForTests() map[string]string {
        typeFiles = []string{"testdata/test.types"}
        return map[string]string{
-               ".t1":  "application/test",
+               ".T1":  "application/test",
                ".t2":  "text/test; charset=utf-8",
                ".png": "image/png",
        }