<p dir="auto">Here's a sample code to illustrate the problem which stems from a case sensitive string matching somewhere in the code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package main

import (
    &quot;fmt&quot;
    &quot;path/filepath&quot;
)

func main() {
    a,_ := filepath.Glob(&quot;c:\\users\\*\\appdata&quot;)
    fmt.Println(a)  //this prints []
    b,_ := filepath.Glob(&quot;c:\\users\\*\\AppData&quot;)
    fmt.Println(b)  //this prints [c:\users\Default\Appdata ...]
}"><pre class="notranslate"><code class="notranslate">package main

import (
    "fmt"
    "path/filepath"
)

func main() {
    a,_ := filepath.Glob("c:\\users\\*\\appdata")
    fmt.Println(a)  //this prints []
    b,_ := filepath.Glob("c:\\users\\*\\AppData")
    fmt.Println(b)  //this prints [c:\users\Default\Appdata ...]
}
</code></pre></div>
<p dir="auto">Because file and directory names in Windows are case insensitive therefore this is a bug.</p>
<p dir="auto">Please note that before the asterisk(*) the path name does not have to match case but after the asterisk it doesn't provide any results if the case doesn't match.</p>
<pre class="notranslate">Here are two functions that won't compile:

func f(x int) bool {
    if x &gt; 5 {
        return true
    } else {
        return false
    }
}

func g(x int) bool {
    switch {
    case x &gt; 5: return true
    default: return false
    }
}

Isn't it possible to make these compile? Perhaps I'm being naive, but if the last
statement in a function that requires a return is an if or a switch and the if has an
else with a return or the switch has a default with a return isn't that sufficient to
know that the function will work? Or are you having to allow for gotos or something else
subverting the flow of control?</pre>