How to include 3rd party libraries in Go on AppEngine?

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

How to include 3rd party libraries in Go on AppEngine?

问题

我想使用pdf库https://godoc.org/code.google.com/p/gofpdf。我只安装了GAE SDK for Go,没有其他的东西。我希望能够这样做:

import "code.google.com/p/gofpdf"

我有一种感觉,整个库都必须下载到我的代码库中?

英文:

I want to use the pdf library https://godoc.org/code.google.com/p/gofpdf. I only have the GAE SDK for Go installed and nothing else. i would like to be able to do:

import "code.google.com/p/gofpdf"

I have a feeling the entire library has to be downloaded into my codebase?

答案1

得分: 3

如果你想在Go语言中使用第三方库,通常会使用"go get"命令。在你的情况下,可以使用以下命令:

go get code.google.com/p/gofpdf

我建议你阅读关于Go语言的这篇文档:

如何编写Go代码

英文:

If you want to use third party libraries in go
you usually us the go -get command
In your case it wil be

go get code.google.com/p/gofpdf

I suggest that you will this this doc on go

How to Write Go Code

huangapple
  • 本文由 发表于 2015年3月28日 04:09:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/29309382.html
匿名

发表评论

匿名网友

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

确定