去GitHub上搜索Oanda API Rest的GoLang实现。

huangapple go评论147阅读模式
英文:

GOanda on github for Oanda API Rest in GoLang

问题

当我尝试安装这个包时:

go get github.com/jasonnfls/goanda

我得到了这个错误:

> /usr/local/go/bin/src/github.com/jasonnfls/goanda/trade.go:47: cannot use responseObj (type UpdateTradeResponse) as type OrderResponse in return argument

解决这个问题的最佳方法是什么?

有人对此有好的解决方案吗?

英文:

When I try to install this package:

go get github.com/jasonnfls/goanda

I get this error:

> /usr/local/go/bin/src/github.com/jasonnfls/goanda/trade.go:47: cannot use responseObj (type UpdateTradeResponse) as type OrderResponse in return argument

What would be the best way to resolve this?

Anyone have a good solution to this?

答案1

得分: 0

包中有一个错误。它包含了无效的代码。

解决方案可以是使用一个没有问题的旧版本(如果有的话),修复这个错误,或者让其他人(可能是作者)来修复这个错误。

英文:

There's a bug in the package. It contains invalid code.

The solution would be to use an older version that isn't broken (if there is one), fix the bug, or get someone else (perhaps the author) to fix the bug.

答案2

得分: 0

包中的错误似乎是一个复制粘贴错误。在文件 trade.go 中,将第20行的返回值从 OrderResponse 改为 UpdateTradeResponse,然后运行 go install github.com/jasonnfls/goanda

该文件将位于 $GOPATH/src/github.com/jasonnfls/goanda

我向仓库所有者提交了一个修复的拉取请求。

英文:

The bug in the package appears to be a copy/paste error. In the file trade.go, change the return value on line 20 from OrderResponse to UpdateTradeResponse, then run go install github.com/jasonnfls/goanda.

The file will be in your $GOPATH/src/github.com/jasonnfls/goanda

I submitted a pull request with the fix to the repo owner.

huangapple
  • 本文由 发表于 2017年4月20日 04:05:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/43505133.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定