用法

作者: 王老怪的开发笔记 | 来源:发表于2024-01-10 14:46 被阅读0次

Is Google using Go internally?

Google 内部使用 Go 吗?

Yes. Go is used widely in production inside Google. One example is Google's download server, dl.google.com, which delivers Chrome binaries and other large installables such as apt-get packages.
是的。Go 在 Google 内部的生产中被广泛使用。一个例子是 Google 的下载服务器,dl.google.com它提供 Chrome 二进制文件和其他大型可安装文件(例如apt-get 软件包)。

delivers
Go is not the only language used at Google, far from it, but it is a key language for a number of areas including site reliability engineering (SRE) and large-scale data processing.
Go 并不是 Google 使用的唯一语言,但它是 站点可靠性工程 (SRE) 和大规模数据处理等许多领域的关键语言。

What other companies use Go?

还有哪些公司使用 Go?

Go usage is growing worldwide, especially but by no means exclusively in the cloud computing space. A couple of major cloud infrastructure projects written in Go are Docker and Kubernetes, but there are many more.
Go 在全球范围内的使用量正在不断增长,尤其是Docker 和 Kubernetes 是用 Go 编写的几个主要云基础设施项目,但绝不只在云计算领域。但还有更多。

exclusively
adv. 唯一地;专门地,特定地;专有地;排外地;

It's not just cloud, though. The Go Wiki includes a page, updated regularly, that lists some of the many companies using Go.
不过,这不仅仅是云。Go Wiki 包含一个 定期更新的页面,其中列出了使用 Go 的众多公司中的一些。

The Wiki also has a page with links to success stories about companies and projects that are using the language.
Wiki 还有一个页面,其中包含 有关使用该语言的公司和项目的 成功故事的链接。

Do Go programs link with C/C++ programs?

Go 程序可以与 C/C++ 程序链接吗?

It is possible to use C and Go together in the same address space, but it is not a natural fit and can require special interface software. Also, linking C with Go code gives up the memory safety and stack management properties that Go provides. Sometimes it's absolutely necessary to use C libraries to solve a problem, but doing so always introduces an element of risk not present with pure Go code, so do so with care.
可以在同一地址空间中一起使用 C 和 Go,但这并不自然,并且可能需要特殊的接口软件。此外,将 C 与 Go 代码链接起来会放弃 Go 提供的内存安全和堆栈管理属性。有时,使用 C 库来解决问题是绝对必要的,但这样做总是会带来纯 Go 代码所不存在的风险,因此请务必小心

If you do need to use C with Go, how to proceed depends on the Go compiler implementation. There are three Go compiler implementations supported by the Go team. These are gc, the default compiler, gccgo, which uses the GCC back end, and a somewhat less mature gollvm, which uses the LLVM infrastructure*.
如果您确实需要将 C 与 Go 一起使用,如何进行取决于 Go 编译器的实现。
Go 团队支持三种 Go 编译器实现。它们是

  • gc默认编译器 ,
  • gccgo它使用 GCC 后端,
  • 以及不太成熟的gollvm,它使用 LLVM 基础设施。

infrastructure
n. 基础设施;基础建设;

Gc uses a different calling convention and linker from C and therefore cannot be called directly from C programs, or vice versa.
The cgo program provides the mechanism for a “foreign function interface” to allow safe calling of C libraries from Go code.
SWIG extends this capability to C++ libraries.
Gc使用与 C 不同的调用约定和链接器,因此不能直接从 C 程序调用,反之亦然。
cgo程序提供了“外部函数接口”的机制,以允许从 Go 代码安全调用 C 库。
SWIG 将此功能扩展到 C++ 库。

versa
adj. 反的;

convention
n. 习俗,惯例;公约;大会; (艺术等)传统风格;

mechanism
n. [生]机制,机能,[乐]机理;(机械)结构,机械装置[作用],(故事的)结构;[艺]手法,技巧,途径;机械作用;

You can also use cgo and SWIG with Gccgo and gollvm. Since they use a traditional API, it's also possible, with great care, to link code from these compilers directly with GCC/LLVM-compiled C or C++ programs. However, doing so safely requires an understanding of the calling conventions for all languages concerned, as well as concern for stack limits when calling C or C++ from Go.
您还可以将cgoand SWIG 与Gccgoand 一起使用gollvm。由于它们使用传统的 API,因此也可以非常小心地将这些编译器的代码直接与 GCC/LLVM 编译的 C 或 C++ 程序链接起来。然而,安全地这样做需要了解所有相关语言的调用约定,以及从 Go 调用 C 或 C++ 时关注堆栈限制

What IDEs does Go support?

Go 支持哪些 IDE?

The Go project does not include a custom IDE, but the language and libraries have been designed to make it easy to analyze source code. As a consequence, most well-known editors and IDEs support Go well, either directly or through a plugin.
Go 项目不包含自定义 IDE,但语言和库的设计旨在使源代码分析变得容易。因此,大多数知名的编辑器和 IDE 都直接或通过插件很好地支持 Go。

The list of well-known IDEs and editors that have good Go support available includes Emacs, Vim, VSCode, Atom, Eclipse, Sublime, IntelliJ (through a custom variant called Goland), and many more. Chances are your favorite environment is a productive one for programming in Go.
具有良好 Go 支持的知名 IDE 和编辑器包括 Emacs、Vim、VSCode、Atom、Eclipse、Sublime、IntelliJ(通过名为 Goland 的自定义变体)等等。您最喜欢的环境很可能是一种高效的 Go 编程环境。

Does Go support Google's protocol buffers?

Go 支持 Google 的协议缓冲区吗?

A separate open source project provides the necessary compiler plugin and library. It is available at github.com/golang/protobuf/.
一个单独的开源项目提供了必要的编译器插件和库。它可以在 github.com/golang/protobuf/上找到。

Can I translate the Go home page into another language?

我可以将 Go 主页翻译成其他语言吗?

Absolutely. We encourage developers to make Go Language sites in their own languages. However, if you choose to add the Google logo or branding to your site (it does not appear on golang.org), you will need to abide by the guidelines at www.google.com/permissions/guidelines.html
绝对可以。我们鼓励开发人员用自己的语言制作 Go 语言网站。但是,如果您选择将 Google 徽标或品牌添加到您的网站(它不会出现在golang.org上),则需要遵守 www.google.com/permissions/guidelines.html上的指南

abide
v. 容忍;逗留,居住;遵守,遵照(规则、决定、劝告等);

相关文章

网友评论

      本文标题:用法

      本文链接:https://www.haomeiwen.com/subject/soqondtx.html