什么是正确的安装Google Go和App Engine SDK的方法?

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

What is the correct way to install Google Go and App Engine SDK?

问题

我一直在我的Mac上使用Go和GAE进行开发,使用的是GoClipse(因为它们无法在Windows上运行)。最近我注意到,当我从github安装一个包时,它出现了一些问题。我决定重新安装整个环境并正确设置。Go安装得很顺利,但是当涉及到集成GAE SDK时,我花了几个小时搜索,只找到了这篇文章:
http://code.google.com/p/goclipse/wiki/GoClipseAndTheGoogleAppEngine
但是由于它告诉你要从go/scr文件夹(goinstall安装包的位置)移动文件,我认为这不是正确的设置方式。

有人可以给我一个清晰、易于跟随的逐步安装Go和GAE SDK的指南吗?

英文:

I've been playing with Go and GAE using GoClipse for a bit now on my Mac (since they won't run on Windows). Recently I noticed that when I goinstall a package from github it had some problems working. I figured I'd reinstall the whole thing and set it up properly. Go installed nicely, but when it came to integrating the GAE SDK it took me a couple hours of searching and came up with only this article:
http://code.google.com/p/goclipse/wiki/GoClipseAndTheGoogleAppEngine
But since it tell you to move files from the go/scr folder (where goinstall installs packages), I reckon it is not the correct way to set everything up.

Can anyone give me a clear, easy to follow step-by-step guide on how to install both Go and GAE SDK on a Mac?

答案1

得分: 7

简短的回答是,Go语言和GAE SDK并不以(我认为)你所期望的方式进行集成。GAE SDK包含了自己的Go工具链版本,与标准工具有一些重要的区别。这些差异足够深入,以至于你很难从尝试统一两者中获得太多的效益。以下是主要的差异:

  • GAE不支持一些标准库中的包,例如"unsafe"
  • GAE不支持CGO
  • GAE通常比主要发行版滞后一个或多个主要版本
  • 在GAE项目中无法使用任何二进制库(无论是Go还是其他语言编写的)(你需要所有的源代码)
  • goinstall不适用于GAE项目

因此,我将我的GAE和非GAE工具视为完全独立的。如果你只进行GAE开发,你可以完全不使用标准工具。

英文:

The short answer is that Go and the GAE SDK do not integrate in the way that (I think) you are looking for. The GAE SDK includes its own version of the Go toolchain that differs in some important ways to the standard tools. Those differences are deep enough that it is unlikely you will derive much utility from trying to unify the two. Here are the big differences:

  • GAE does not support some packages from the standard lib e.g. "unsafe"
  • GAE does not support CGO
  • GAE often lags the main distribution by one or more major versions
  • You cannot use any binary libraries (go or otherwise) in a GAE project (you need source for everything)
  • goinstall is not intended for use with GAE projects

Because of this I treat my GAE and non-GAE tools as completely separate. If you're only doing GAE development, you could do without the standard tools altogether.

huangapple
  • 本文由 发表于 2011年9月29日 23:13:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/7599476.html
匿名

发表评论

匿名网友

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

确定