尝试从app引擎实现存储api ...我已经多次尝试在其他帖子上找到逻辑(从其他帖子中找到)来改变项目和包的位置,但似乎没有任何效果。
项目文件夹 的 /用户/ luisortega / goLibs / aural9
用于appengine的命令 goapp deploy --version = core
回显$ GOPATH 的 /用户/ luisortega / goLibs
回显$ GOROOT 的 /用户/ luisortega /去
go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/luisortega/goLibs"
GORACE=""
GOROOT="/Users/luisortega/go"
GOTOOLDIR="/Users/luisortega/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/d3/vjs7zbb91dq160clq9f7pzgr0000gp/T/go-build130074555=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
ls -la $ GOPATH / src
total 24
drwxr-xr-x 9 luisortega staff 306 Mar 13 02:28 .
drwxr-xr-x 4 luisortega staff 136 Mar 13 01:42 ..
-rw-r--r--@ 1 luisortega staff 8196 Mar 13 02:16 .DS_Store
drwxr-xr-x 8 luisortega staff 272 Mar 13 02:45 aural9
drwxr-xr-x 11 luisortega staff 374 Mar 13 01:38 github.com
drwxr-xr-x 3 luisortega staff 102 Feb 13 21:33 golang.org
drwxr-xr-x 40 luisortega staff 1360 Mar 13 02:37 google-cloud-go
drwxr-xr-x 3 luisortega staff 102 Feb 13 21:33 google.golang.org
drwxr-xr-x 4 luisortega staff 136 Mar 13 02:16 sourcegraph.com
一个重要的注意事项是,当我导入云引擎时
git clone https://github.com/GoogleCloudPlatform/google-cloud-go.git
我最初在我的项目文件夹中导入(并创建了'google-cloud-go'文件夹...如果我尝试以这种方式编译,我最终会出现以下错误。
解析输入失败:解析器:google-cloud-go / internal / pretty / diff.go中的错误导入“syscall”
实际完整的消息......
Traceback (most recent call last): File "/Users/luisortega/go_appengine/appcfg.py", line 133, in <module>
run_file(__file__, globals()) File "/Users/luisortega/go_appengine/appcfg.py", line 129, in run_file
execfile(_PATHS.script_file(script_name), globals_) File "/Users/luisortega/go_appengine/google/appengine/tools/appcfg.py", line 5510, in <module>
main(sys.argv) File "/Users/luisortega/go_appengine/google/appengine/tools/appcfg.py", line 5501, in main
result = AppCfgApp(argv).Run() File "/Users/luisortega/go_appengine/google/appengine/tools/appcfg.py", line 2975, in Run
self.action(self) File "/Users/luisortega/go_appengine/google/appengine/tools/appcfg.py", line 5157, in __call__
return method() File "/Users/luisortega/go_appengine/google/appengine/tools/appcfg.py", line 3889, in Update
self._UpdateWithParsedAppYaml(appyaml, self.basepath) File "/Users/luisortega/go_appengine/google/appengine/tools/appcfg.py", line 3942, in _UpdateWithParsedAppYaml
self.UpdateVersion(rpcserver, basepath, appyaml, APP_YAML_FILENAME) File "/Users/luisortega/go_appengine/google/appengine/tools/appcfg.py", line 3799, in UpdateVersion
raise RuntimeError(stderr) RuntimeError: 2017/03/13 02:53:53 go-app-builder: Failed parsing input: parser: bad import "syscall" in google-cloud-go/internal/pretty/diff.go
error while running appcfg.py: exit status 1
所以我把文件夹移到我的$ GOPATH / src文件夹......
然后是 无法找到导入:“cloud.google.com/go/storage”