title: Go linter in VS code not working for packages across multiple files?
body: <p>I have installed the Go extension (version 0.11.4) in Visual Studio Code on MacOS:</p>
  
  <p><a href="https://i.stack.imgur.com/s5mz2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/s5mz2.png" alt="enter image description here"></a></p>
  
  <p>However, I find that the linter does not 'pick up' functions defined in the same package, but in different files. For example, if I create in the same directory a file <code>foo.go</code> with</p>
  
  <pre><code>package foobar
  
  import "fmt"
  
  func main() {
      fmt.Println(SayHello())
  }
  </code></pre>
  
  <p>and a file <code>bar.go</code> with</p>
  
  <pre><code>package foobar
  
  func SayHello() string {
      return "Hello, world!"
  }
  </code></pre>
  
  <p>then in <code>foo.go</code> I get a linter error that <code>SayHello</code> is an <code>undeclared name</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/ZN6j4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZN6j4.png" alt="enter image description here"></a></p>
  
  <p>I've read about a similar issue here (<a href="https://github.com/golang/lint/issues/57" rel="noreferrer">https://github.com/golang/lint/issues/57</a>), but since that issue is five years old I figured it might be fixed by now? Or does <code>golint</code> simply not work across multiple files?</p>