title: errors parsing go.mod How to deploy go app on App Engine with Cloud build?
body: <p>So I have this Go app which is running fine on the localhost but I want to host on the google cloud and the cloud is already setup. The whole dir tree looks like this.</p>
  
  <pre><code>gocode
  ---bin
  ---pkg
  ---src
    ---cloud.google.com
    ---github.com
    ...
    ---appname
      ---auth
      ---database
      ...
      ---main.go
      ---app.yaml
      ---cloudbuild.yaml
      ---go.mod
  </code></pre>
  
  <p>Here is the <strong>app.yaml</strong></p>
  
  <pre><code>runtime: go112
  api_version: go1
  
  handlers:
  - url: /.*
    script: _go_app
  </code></pre>
  
  <p>Here is the <strong>cloudbuild.yaml</strong></p>
  
  <pre><code>steps:
  
  - name: 'golang'
    args: ['go', 'build', '.']
    env: ['GO111MODULE=on']
  
  - name: 'gcr.io/cloud-builders/go'
    args: ['get', '-d', 'appname']
    env: ['GOPATH=/gopath/','MODE=dev']
    volumes:
    - name: 'go'
      path: '/gopath'
  
  - name: 'gcr.io/cloud-builders/gcloud'
    args: ['app', 'deploy']
    env: ['GOPATH=/gopath/','MODE=dev']
    volumes:
    - name: 'go'
      path: '/gopath'
  </code></pre>
  
  <p>Here is the <strong>go.mod</strong></p>
  
  <pre><code>module github.com/Raj-Varun/appname-API/
  
  require github.com/spf13/viper
  </code></pre>
  
  <p>When I'm running <code>gcloud builds submit --config cloudbuild.yaml .</code> I'm getting this error</p>
  
  <pre><code>tarting Step #0
  Step #0: Pulling image: golang
  Step #0: Using default tag: latest
  Step #0: latest: Pulling from library/golang
  Step #0: Digest: sha256:a50a9364e9170ab5f5b03389ed33b9271b4a7b6bbb0ab41c4035adb3078927bc
  Step #0: Status: Downloaded newer image for golang:latest
  Step #0: docker.io/library/golang:latest
  Step #0: go: errors parsing go.mod:
  Step #0: /workspace/go.mod:3: usage: require module/path v1.2.3
  Finished Step #0
  ERROR
  ERROR: build step 0 "golang" failed: exit status 1
  </code></pre>