在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:bingohuang/effective-go-zh-en开源软件地址:https://github.com/bingohuang/effective-go-zh-en开源编程语言:开源软件介绍:《Effective Go》中英双语版Effective Go - 《实效 GO 编程》IntroductionGo is a new language. Although it borrows ideas from existing languages, it has unusual properties that make effective Go programs different in character from programs written in its relatives. A straightforward translation of a C++ or Java program into Go is unlikely to produce a satisfactory result—Java programs are written in Java, not Go. On the other hand, thinking about the problem from a Go perspective could produce a successful but quite different program. In other words, to write Go well, it's important to understand its properties and idioms. It's also important to know the established conventions for programming in Go, such as naming, formatting, program construction, and so on, so that programs you write will be easy for other Go programmers to understand. This document gives tips for writing clear, idiomatic Go code. It augments the language specification, the Tour of Go, and How to Write Go Code, all of which you should read first. 引言Go 是一门全新的语言。尽管它从既有的语言中借鉴了许多理念,但其与众不同的特性,使得用 Go 编程在本质上就不同于其它语言。将现有的 C++ 或 Java 程序直译为 Go 程序并不能令人满意——毕竟 Java 程序是用 Java 编写的,而不是 Go。 另一方面,若从 Go 的角度去分析问题,你就能编写出同样可行但大不相同的程序。 换句话说,要想将 Go 程序写得好,就必须理解其特性和风格。了解命名、格式化、程序结构等既定规则也同样重要,这样你编写的程序才能更容易被其他程序员所理解。 本文档就如何编写清晰、地道的 Go 代码提供了一些技巧。它是对 语言规范、 Go 语言之旅 以及 如何使用 Go 编程 的补充说明,因此我们建议您先阅读这些文档。
章节
参考参考官方英文版:Effective Go 英文版
参考中文翻译版二:Effective Go 中文版 Read, Fork and Star
下载为了让大家更方便阅读,在此提供 网易蜂巢对象存储 的下载地址: License除特别注明外,本页内容均采用知识共享 - 署名(CC-BY)3.0 协议授权,代码采用 BSD 协议 授权。 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论