Golang:不同的AppEngine软件包 [英] Golang: Different AppEngine packages

查看:373
本文介绍了Golang:不同的AppEngine软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这两个AppEngine套件有何区别:
https:// cloud.google.com/appengine/docs/go/reference
https: //godoc.org/google.golang.org/appengine



唯一突出的是第二个没有上下文类型 p>

应该在开发应用程序时使用哪一个?

google.golang.org/appengine软件包可在托管虚拟机和App Engine Classic上运行。 appengine软件包仅适用于App Engine Classic。



google.golang.org/appengine包使用 x / net / context 包。 appengine包使用特定于这些包的上下文。

code-using-deprecated-removed-or-modified-apisrel =nofollow> https://github.com/golang/appengine#3-update-code-using-deprecated-removed-or-modified-apis 获取API差异列表。


What is the difference between this two AppEngine packages: https://cloud.google.com/appengine/docs/go/reference https://godoc.org/google.golang.org/appengine

The only thing that stands out for me is that 2nd one has no Context type

Which one should someone use in developing an application?

解决方案

The "google.golang.org/appengine" packages work on both managed VMs and App Engine Classic. The "appengine" packages work on App Engine Classic only.

The "google.golang.org/appengine" packages use the x/net/context package for passing context around. The "appengine" packages use a context specific to those packages.

See https://github.com/golang/appengine#3-update-code-using-deprecated-removed-or-modified-apis for a list of differences in the APIs.

这篇关于Golang:不同的AppEngine软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆