Ebooks

The Go Programming Language is the authoritative resource for any programmer who wants to learn Go. It shows how to write clear and idiomatic Go to solve real-world problems. The book does not assume prior knowledge of Go nor experience with any specific language, so you’ll find it accessible whether you’re most comfortable with JavaScript, Ruby, Python, Java, or C++. The first chapter is a tutorial on the basic concepts of Go, introduced through programs for file I/O and text processing, simple graphics, and web clients and servers. Early chapters cover the structural elements of Go programs: syntax, control flow, data types, and the organization of a program into packages, files, and functions. The examples illustrate many packages from the standard library and show how to create new ones of your own. Later chapters explain the package mechanism in more detail, and how to build, test, and maintain projects using the go tool. The chapters on methods and interfaces introduce Go’s unconventional approach to object-oriented programming, in which methods can be declared on any type and interfaces are implicitly satisfied. They explain the key principles of encapsulation, composition, and substitutability using realistic examples. Two chapters on concurrency present in-depth approaches to this increasingly important topic. The first, which covers the basic mechanisms of goroutines and channels, illustrates the style known as communicating sequential processes for which Go is renowned. The second covers more traditional aspects of concurrency with shared variables. These chapters provide a solid foundation for programmers encountering concurrency for the first time. The final two chapters explore lower-level features of Go. One covers the art of metaprogramming using reflection. The other shows how to use the unsafe package to step outside the type system for special situations, and how to use the cgo tool to create Go bindings for C libraries.

The book features hundreds of interesting and practical examples of well-written Go code that cover the whole language, its most important packages, and a wide range of applications. Each chapter has exercises to test your understanding and explore extensions and alternatives. Source code is freely available for download from http://gopl.io/ and may be conveniently fetched, built, and installed using the go get command.

本書是學習Go語言的權威資源,它展現如何撰寫清楚且正確的Go程式以解決實務上的問題。閱讀此書無需Go或其他特定語言的經驗,JavaScript、Ruby、Python、Java或C++等程式設計師都能夠輕鬆上手。

*第一章討論Go的基本概念,介紹檔案輸出入、文字處理、簡單圖形、與網路用戶端以及伺服器等。

*前幾個章節涵蓋了Go程式的結構元素:語法、流程控制、資料型別、與組織程式套件、檔案及函式。書中範例展示標準函式庫的套件並示範如何自行建構套件。其後的章節則深入解釋套件機制、如何使用Go工具建構、測試與維護專案。

*方法與介面相關章節介紹Go獨特的物件導向程式設計方式,其方法可以在間接滿足條件的型別與介面上宣告。這些章節以實際的範例解釋了封裝、組合與可替換性的重要原則。

*兩個與並行性有關的篇章深入此越顯重要的主題。首先是goroutine與channel基本機制的討論,描述Go最為人稱道的交談循序程式。其次是使用共用變數的傳統並行性。這些章節為首次遭遇並行性的程式設計師提供堅實的基礎。

*最後兩章探索Go的低階功能,一個是使用reflection的元編程藝術,另一個是如何使用unsafe套件在特殊情況下跳脫型別系統以及使用cgo工具建構Go的C函式庫連結。

書中數百個有趣與實用的Go範例程式涵蓋整個語言最重要的套件與各種應用。每一章都有練習題以測試你的理解並探索擴充與替代方案。原始碼可從http://gopl.io/下載並能使用go get命令取得、建構、與安裝。

#碁峰資訊 GOTOP Information Inc.

©2019 GoogleSite Terms of ServicePrivacyDevelopersArtistsAbout Google|Location: United StatesLanguage: English (United States)
By purchasing this item, you are transacting with Google Payments and agreeing to the Google Payments Terms of Service and Privacy Notice.