• Go Module 教程第 5 部分:Vendoring

    前四个教程: - [Go Module 教程第 1 部分:为什么和做什么](https://studygolang.com/articles/24580) - [Go Module 教程第 2 部分:项目、依赖和 gopls](https://studygolang.com/articles/35202) - [Go Module 教程第 3 部分:最小版本选择](https://studygolang.com/articles/35210) - [Go Module 教程第 4 部...

  • Go Module 教程第 4 部分:镜像、校验和以及 Athens

    前三个教程: - [Go Module 教程第 1 部分:为什么和做什么](https://studygolang.com/articles/24580) - [Go Module 教程第 2 部分:项目、依赖和 gopls](https://studygolang.com/articles/35202) - [Go Module 教程第 3 部分:最小版本选择](https://studygolang.com/articles/35210) > 注意,该教程基于 Go1.13。...

  • Go Module 教程第 3 部分:最小版本选择

    前两个教程: - [Go Module 教程第 1 部分:为什么和做什么](https://studygolang.com/articles/24580) - [Go Module 教程第 2 部分:项目、依赖和 gopls](https://studygolang.com/articles/35202) > 注意,该教材基于 1.13。最新版本可能会有所不同。 ## 引言 每个依赖管理解决方案都必须解决选择依赖版本的问题。目前存在的许多版本选择算法都试图识别任何依赖关...

  • Go Module 教程第 2 部分:项目、依赖和 gopls

    ## 引言 模块是集成到 Go 系统中,为依赖管理提供支持。这意味着模块几乎可以触及任何与源代码相关的内容,包括编辑器支持。为了向编辑器提供模块支持(以及其他原因) ,Go 团队构建了一个名为 [gopls](https://github.com/golang/tools/blob/master/gopls/doc/user.md) 的服务,它实现了语言服务器协议([LSP](https://microsoft.github.io/language-server-protocol/))。L...

  • unsafe 真就不安全吗?- part2

    在[上篇文章](https://studygolang.com/articles/28433)中,我已经谈到了 unsafe 包的初衷和功能。但还有一件事情没有解释。 ## type pointer 此类型表示指向任意类型的指针,这意味着,unsafe.Pointer 可以转换为任何类型或 uintptr 的指针值。你可能会想: 有什么限制吗?没有,是的... 你可以转换 Pointer 为任何你想要的,但你必须处理可能的后果。为了减少可能出现的问题,你可以使用某些模式: > ...

  • 120
    Go 官方 2020 年开发者调查报告

    2021 年 3 月 9 日,在 Go 官方博客发布了 Go 开发者 2020 年调查报告。一起来看看该报告的内容吧。 > 2020 年,一共有 9648 人参与投票,大约相当于 2019 年的投票人数。 说明:你可能会注意到有些问题的样本量比其他问题小 (“n =”)。这是因为有些问题是向所有人展示的,而另一些只是向随机的一部分受访者展示。 ## 01 报告摘要 - Go 的使用场景和企业都在扩大,76% 的受访者工作中使用 Go;66% 的人说 Go 对他们公司的成功...