title: golang: build command-line-arguments: cannot find module for path x
body: <p>I am getting an issue running a function from a non-main package in main.go</p>
  <pre><code>// main.go
  package main
  
  import test &quot;./tests&quot;
  
  func main() {
      test.Test(&quot;hello world&quot;)
  }
  
  
  // (relative to main.go) ./tests/test.go
  package test
  
  import &quot;fmt&quot;
  
  func Test(str string) {
      fmt.Println(str)
  }
  </code></pre>
  <p>Output:
  <code>build command-line-arguments: cannot find module for path _/c_/Users/Mike/Desktop/random/tests </code></p>