我有一个项目,其中使用go dep导入Gobot软件包。 但是,当尝试构建时,我得到了:
cannot use r (type *raspi.Adaptor) as type "github.com/lucavallin/hytta-agent/vendor/gobot.io/x/gobot/drivers/i2c".Connector in argument to "github.com/lucavallin/hytta-agent/vendor/gobot.io/x/gobot/drivers/i2c".NewGrovePiDriver:
*raspi.Adaptor does not implement "github.com/lucavallin/hytta-agent/vendor/gobot.io/x/gobot/drivers/i2c".Connector (wrong type for GetConnection method)
have GetConnection(int, int) ("gobot.io/x/gobot/drivers/i2c".Connection, error)
want GetConnection(int, int) ("github.com/lucavallin/hytta-agent/vendor/gobot.io/x/gobot/drivers/i2c".Connection, error)
类型还可以,示例由Gobot背后的人员提供,但是go似乎并不高兴,因为它期望对象来自“绝对仓库”而不是我的供应商目录。
有什么主意我可以解决这个问题吗?