About 16,500,000 results
Open links in new tab
  1. 怎么学习 Golang? - 知乎

    目前已经更新了 30 多篇,覆盖了 Golang 90% 的入门必学知识点,内容我还在不断完善更新中,而且 我还规划实战板块,比如 Web 开发,爬虫程序的编写等,敬请期待。 如果你还在入门阶段,或者准备入门,那么建议把我的个人网站收藏一下,完全可以当做 wiki 查阅。

  2. Difference between := and = operators in Go - Stack Overflow

    May 5, 2020 · What is the difference between the = and := operators, and what are the use cases for them? They both seem to be for an assignment?

  3. 为什么要使用 Go 语言?Go 语言的优势在哪里? - 知乎

    Golang 为并发而生 Golang 从 2009 年正式发布以来,依靠其极高运行速度和高效的开发效率,迅速占据市场份额。 Golang 从语言级别支持并发,通过轻量级协程 Goroutine 来实现程序并发运行。 Goroutine 非常轻量,主要体现在以下两个方面:

  4. go - What is the meaning of '*' and '&'? - Stack Overflow

    Golang does not allow pointer-arithmetic (arrays do not decay to pointers) and insecure casting. All downcasts will be checked using the runtime-type of the variable and either panic or return false as second return-value when the instance is of the wrong type, depending on whether you actually take the second return type or not.

  5. 想系统学习GO语言 (Golang),能推荐几本靠谱的书吗? - 知乎

    二、《8小时转职Golang工程师》 文章正文: 8小时转职Golang工程师 · 语雀 简介:《8小时转职Golang工程师》偏入门级,主要是针对后端想快速低成本掌握Golang开发人群学习,如您已经掌握Golang请绕行。

  6. How to check if a map contains a key in Go? - Stack Overflow

    Oct 18, 2022 · Here's how you check if a map contains a key. val, ok := myMap["foo"] // If the key exists if ok { // Do something } This initializes two variables. val is the value of "foo" from the map if it exists, or a "zero value" if it doesn't (in this case the empty string). ok is a bool that will be set to true if the key existed. If you want, you can shorten this to a one-liner. if val, ok := myMap ...

  7. How to search for an element in a golang slice - Stack Overflow

    Jul 29, 2016 · How to search for an element in a golang slice Asked 8 years, 11 months ago Modified 3 days ago Viewed 364k times

  8. Default value in Go's method - Stack Overflow

    Feb 10, 2022 · Is there a way to specify default value in Go's function? I am trying to find this in the documentation but I can't find anything that specifies that this is even possible. func SaySomething(i str...

  9. What is an idiomatic way of representing enums in Go?

    Jan 21, 2013 · It uses structures in Golang, and draws upon Object Oriented Principles to tie them all together in a neat little bundle. None of the underlying code will change when a new enumeration is added or deleted. The process is: Define an enumeration structure for enumeration items: EnumItem. It has an integer and string type.

  10. How to import local packages in go? - Stack Overflow

    Feb 18, 2016 · All imports are "local" regardless of the import path. See "How to Write Go Code" for a detailed explanation.