获取:与使用谷歌应用引擎从GOPATH导入的同一文件冲突,但不是纯粹本地

时间:2017-10-03 16:00:12

标签: google-app-engine

我仍在尝试将谷歌应用引擎部署到本地测试环境和应用引擎本身,我不断收到此错误:

.getSource()

我使用grep来查看是否显式导入2017/10/03 17:50:40 go-app-builder: Failed parsing input: app file DbConfig.go conflicts with same file imported from GOPATH 但是我,这是grep的结果:

DbConfig

所以从我可以告诉我不应该得到一个错误,因为我的模型包中的其他结构工作得很好,这对我来说非常奇怪。首先是因为Google App Engine接受了部署,后来首先失败,其次是因为开发服务器立即失败,最后因为如果我在应用引擎之外运行,我不会收到此错误。

有人可以给我一个如何解决这个问题的指针。我已经搜索了一个修复程序,但是大多数状态都使用我已经使用的绝对包含路径。

编辑: 我忘了包含使用的构建命令,也许这会有所帮助

$ grep -r 'DbConfig' .
./config.go:func GetDatabaseConfiguration() model.DbConfig {
./config.go:    return model.DbConfig{connectionName, user, password, dbType, dbName}
Binary file ./share-services matches
./queries/db-config.go: dbConfig model.DbConfig
./queries/db-config.go:func Config(newDbConfig model.DbConfig) {
./queries/db-config.go: dbConfig = newDbConfig
./model/DbConfig.go:type DbConfig struct {
./model/DbConfig.go:func (d DbConfig) ConnectionString() string {

这是我的项目结构:

go-app-builder -app_base /home/tools/go/src/bitbucket.com/chocolate-cloud-dev/share-services -arch 6 -dynamic -goroot /home/tools/sdks/google-cloud-sdk/platform/google_appengine/goroot-1.6 -gopath /home/tools/go -nobuild_files ^^$ -incremental_rebuild -unsafe -print_extras_hash links/generator.go model/user.go model/service.go model/SharedWith.go handlers.go config.go model/connection.go jsonHelpers/decoders.go queries/share-with-queries.go authentication/autenticate.go queries/share-queries.go model/share.go download/download.go model/Download.go model/File.go queries/file-queries.go jsonHelpers/encoders.go queries/db-config.go model/DbConfig.go model/NewestFile.go share-services.go jsonHelpers/CreateShare.go queries/download-queries.go

1 个答案:

答案 0 :(得分:0)

答案是使用相对路径而不是绝对路径,这仍然不能完全工作或制作100%平坦的文件夹结构。