duan246558 2019-01-08 10:19
浏览 32

`gcloud app deploy`命令选择了错误的GOPATH

I am Using go1.11.4 for postgre connection and strictly using GAE standard. My app.yaml is as below-

runtime: go111

service: alerting-postgre-service-ad

In my main.go my imports are as below-

package main
 import (
    "database/sql"
    "encoding/json"
    "fmt"
    "log"
    "net/http"
//"google.golang.org/appengine"
_ "github.com/GoogleCloudPlatform/cloudsqlproxy/proxy/dialers/postgres"
)

when I execute command - gcloud app deploy app.yaml on console I get follwoing error-

ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build a3389d5a-7969-4211-9c96-2377f487b604 status: FAILURE. Build error details: srv/main.go:10:2: cannot find package "github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/dialers/postgres" in any of: /usr/local/go/src/github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/dialers/postgres (from $GOROOT) /tmp/staging321436436/srv/gopath/src/github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/dialers/postgres (from $GOPATH)

As I am using windows 10, I don't know where to fix my gopath as my gopath is already set to C:\Users\aniruddh.dwivedi\go while goroot is C:\Go

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 2024-五一综合模拟赛
    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题
    • ¥15 matlab中使用gurobi时报错
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭