下载  >  开发技术  >  其它  > The Go Programming Language

The Go Programming Language 评分:

The Go ProgThe Go Programming Languageramming LanguageThe Go ProgramminThe Go Programming LanguageThe Go Programming LanguageThe Go Programming LanguageThe Go Programming LanguageThe Go Programming LanguageThe Go Programming LanguageThe Go Programming LanguageThe Go Programming LanguageThe Go Progra
This page intentionally left blank From the Library of yIGUANG HU The go Programming anguage Alan A.a. donovan Google Inc Brian W. Kernighan Princeton university ÷ Addison- Wesley New york· Boston· Indianapolis· San francisco Toronto· Montreal. London· Munich· Paris· Madrid Capetown. Sydney· Tokyo· Singapore· Mexico City From the Library of yIGUANG HU Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trade mark claim, the designations have been printed with initial capital letters or in all capitals The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein For information about buying this title in bulk quantities, or for special sales opportunities(which may include electronic versions; custom cover designs, and content particular to your business, train ing goals, marketing focus, or branding interests), please contact our corporate sales department at corpsales@pearsoned com or(800)382-3419 Forgovernmentsalesinquiriespleasecontactgovernmentsales@pearsoned.com ForquestionsaboutsalesoutsidetheUnitedStates,pleasecontactinternational@pearsoned.com Visit us on the Web: informit. com/aw Library of Congress Control Number: 2015950709 Copyright 2016 Alan A A. Donovan Brian W Kernighan All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain permission to use material from this work, please submit a written request to Pearson Education, InC, Permissions Department, 200 Old Tappan Road, Old Tappan, New Jersey 07675, or you may fax your request to(201)236-3290 Front cover: Millau Viaduct, Tarn valley, southern France. A paragon of simplicity in modern engi neering design, the viaduct replaced a convoluted path from capital to coast with a direct route over the clouds. o Jean-Pierre Lescourret/ Corbis Back cover: the original Go gopher. O 2009 Renee French USed under Creative Commons Attribu tions 3. 0 license Typeset by the authors in Minion Pro, Lato, and Consolas, using Go, groff, ghostscript, and a host of other open-source Unix tools. Figures were created in Google Drawings ISBN-13:978-0-13-419044-0 ISBN-10:0-13-4190440 Text printed in the United States on recycled paper at RR Donnelley in Crawfordsville, Indiana First printing, October 2015 From the Library of yIGUANG HU For Leila and meg From the library of YIGUANG HU This page intentionally left blank From the Library of yIGUANG HU Contents Preface The Origins of Go XII The go project ⅹ111 Organization of the Book XY Where to find more information Acknowledgments 1. Tutorial 1. 1. Hello, world 1. 2. Command-Line Arguments 1148 1.3. Finding duplicate Lines 1. 4. Animated gifs 13 1.5. Fetching a URL 15 1.6. Fetching URLs Concurrently 17 1.7. A Web server 19 1. 8. Loose ends 23 2. Program Structure 7 21. Names 27 2.2. Declarations 28 23. Variables 30 2.4. Assignments 2.5. Type Declarations 39 2.6. Packages and files 41 2.7. Scope 45 From the library of YIGUANG HU CONTENTS 3. Basic Data Types 51 3. 1. Integers 51 3.2. Floating-Point Numbers 56 3.3. Complex Numbers 61 3. 4. Booleans 3.5. Strings 64 3.6. Constant 75 4. Composite Types 81 4. 1. Arrays 81 4.2. SI 84 4. 3. Maps 93 4.4. Structs 99 4.5. SON 107 4.6. Text and HTML Templates 5. Functions 119 5. 1. Function declarations 119 5. 2. Recursion 121 5. 3. Multiple return values 124 5.4. Errors 127 5.5. Function Values 132 5.6. Anonymous Functions 135 5.7. Variadic functions l42 5. 8. Deferred Function calls 143 5. 9. Panic 148 5.10. Recover 151 6. Methods 155 6. 1. Method declarations 155 6. 2. Methods with a pointer receiver l58 6.3. Composing Types by Struct Embedding 161 6.4. Method values and expressions 164 6.5. Example: Bit Vector Type 165 6.6. Encapsulation 168 7. Interfaces 171 7. 1. Interfaces as Contracts l71 7.2. Interface Types 174 7. 3. Interface Satisfaction 75 7. 4. Parsing Flags with flag Value 179 7.5. Interface values 181 From the library of YIGUANG HU CONTENTS 7.6. Sorting with sort Interface 186 7.7.ThehttphAndlerInterface 191 7. 8. The error interface 196 7.9. Example: Expression Evaluator 197 7.10. Type Assertions 205 7. 11. Discriminating Errors with Type Assertions 206 7. 12. Querying Behaviors with Interface Type Assertions 208 7.13. Type Switches 210 7. 14. Example: Token-Based XML Decoding 213 7. 15. A Few Words of Advice 216 8. Goroutines and channels 217 81. Goroutines 217 8.2. Example: Concurrent Clock Server 219 8.3. Example: Concurrent Echo Server 222 8. 4. Channels 225 8.5. Looping in Parallel 234 8.6. Example: Concurrent Web Crawler 239 8.7. Multiplexing with select 244 8.8. Example: Concurrent Directory Traversal 247 8. 9. Cancellation 251 8.10. Example: Chat Server 253 9. Concurrency with Shared variables 57 9. 1. Race Conditions 257 9.2. Mutual Exclusion: sync Mutex 262 9.3. Read/ Write Mutexes: sync. RWMutex 266 9.4. Memory synchronization 267 9.5. Lazy Initialization: sync. Once 268 9.6. The Race Detector 271 9.7. Example: Concurrent Non-Blocking Cache 272 9. 8. Goroutines and Threads 280 10. Packages and the go Tool 283 10.1. Introduction 283 10.2. Import Paths 284 10.3. The Package Declaration 285 10.4. Import declarations 285 10.5. Blank Imports 286 10.6. Packages and naming 289 10.7. The go tool 290 From the library of YIGUANG HU

...展开详情
2018-07-01 上传 大小:3.77MB
举报 收藏
分享
《The Go Programming Language》(中文版)高清,还带目录

本书由《C程序设计语言》的作者Kernighan和谷歌公司Go团队主管Alan Donovan联袂撰写,是学习Go语言程序设计的指南。本书共13章,主要内容包括:Go的基础知识、基本结构、基本数据类型、复合数据类型、函数、方法、接口、goroutine、通道、共享变量的并发性、包、go工具、测试、反射等。 本书适合作为计算机相关专业的教材,也可供Go语言爱好者阅读。

立即下载
The Go Programming Language PDF

The Go Programming Language 英文版 Brian W. Kernighan / Alan Donovan

立即下载
GO语言圣经中文版(The Go Programming Language) 高清彩色完整版

Go语言是谷歌2009发布的第二款开源编程语言。 Go语言专门针对多处理器系统应用程序的编程进行了优化,使用Go编译的程序可以媲美C或C++代码的速度,而且更加安全、支持并行进程。

立即下载
go编程语言(The Go Programming Language) 圣经 英文版

go语言圣经 英文版 该书应该是最全面的Go编程手册了,全面易懂,服务器端Go开发人员必备手册

立即下载
The Go Programming language

高清无水印版本The Go Programming Language,最好的go语言教程

立即下载
GO语言圣经(The Go Programming Language)

Go语言圣经( 中文版)。Go语言圣经 《 The Go Programming Language》 中文版本, 仅供学习交流之用。英文原版地址 http://www.gopl.io/

立即下载
Go语言圣经 《The Go Programming Language》 中文版本

最好的go语言书籍,go语言圣经,Go程序设计语言,mobi版

立即下载
The Go Programming Language 英文版 PDF

Go程序设计语言英文版,无水印,,强烈建议大家看英文版,

立即下载
The Go Programming Language

Go语言圣经呀,大家一起学习

立即下载
the go programming language

Brian W. Kernighan 新go语言书籍,R&C之后的又一力作 学习go语言必读

立即下载
Go语言圣经 《The Go Programming Language》 中文版0分下载

Go语言圣经 《The Go Programming Language》 中文版pdf

立即下载
The Go Programming Language中文版

0.1. Go语言起源 0.2. Go语言项目 0.3. 本书的组织 0.4. 更多的信息 0.5. 致谢 1. 入门 1.1. Hello, World 1.2. 命令行参数 1.3. 查找重复的行 1.4. GIF动画 1.5. 获取URL 1.6. 并发获取多个URL 1.7. Web服务 1.8. 本章要点 2. 程序结构 2.1. 命名 2.2. 声明 2.3. 变量 2.4. 赋值 2.5. 类型 2.6. 包和文件 2.7. 作用域 3. 基础数据类型 3.1. 整型 3.2. 浮点数 3.3. 复数 3.4. 布尔型 3.5. 字符串 3.6. 常量 4. 复合数据类型 4.1

立即下载
The Go Programming Language中文版——go语言圣经

The Go Programming Language中文版——go语言圣经

立即下载
Go语言圣经 高清 pdf

Kernighan合作编写。Go语言被誉为21世纪的C语言,如果说K&R所著的《The C Programming Language》是圣经的旧约,那么D&K所著的这本书必将成为圣经的新约。

立即下载