title: Accessing local packages within a go module (go 1.11)
body: <p>I'm trying out Go's new modules system and am having trouble accessing local packages. The following project is in a folder on my desktop outside my gopath.</p>
  
  <p>My project structure looks like:</p>
  
  <pre><code>/
    - /platform
        - platform.go
    - main.go
    - go.mod
  </code></pre>
  
  <hr>
  
  <pre><code>// platform.go
  package platform
  
  import "fmt"
  
  func Print() {
      fmt.Println("Hi")
  }
  </code></pre>
  
  <hr>
  
  <pre><code>// main.go
  package main
  
  import "platform"
  
  func main() {
      platform.Print()
  }
  </code></pre>
  
  <p><code>go build main.go</code> tells me</p>
  
  <pre><code>cannot find module for path platform
  </code></pre>