商品详情

| 商品基本信息 | |
| 商品名称: | Go程序设计语言(英文版) |
| 作者: | 【美】艾伦 A.A.多诺万 |
| 市场价: | 79.00 |
| ISBN号: | 9787111526285 |
| 版次: | 1-3 |
| 出版日期: | 2016-01 |
| 页数: | 366 |
| 字数: | 400 |
| 出版社: | 机械工业出版社 |

| 目录 | |
| 目 录 第1章 综述 1 1.1 Hello,World 1 1.2 命令行参数 4 1.3 查找重复行 8 1.4 GIF动画 13 1.5 获取一个URL 15 1.6 并发获取多个URL 17 1.7 实现一个Web服务器 19 1.8 杂项 23 第2章 程序结构 27 2.1 名字 27 2.2 声明 28 2.3 变量 30 2.4 赋值 36 2.5 类型声明 39 2.6 包和文件 41 2.7 作用域 45 第3章 基本数据类型 51 3.1 整数 51 3.2 浮点数 56 3.3 复数 61 3.4 布尔量 63 3.5 字符串 64 3.6 常量 75 第4章 复合类型 81 4.1 数组 81 4.2 切片 84 4.3 键值对 93 4.4 结构体 99 4.5 JSON 107 4.6 文本和HTML模板 113 第5章 函数 119 5.1 函数声明 119 5.2 递归 121 5.3 多返回值 124 5.4 错误 127 5.5 作为值的函数 132 5.6 匿名函数 135 5.7 变参函数 142 5.8 延后函数调用 143 5.9 崩溃 148 5.10 恢复 151 第6章 方法 155 6.1 方法声明 155 6.2 带有指针接收器的方法 158 6.3 包含嵌入结构体的复合类型 161 6.4 作为值和表达式的方法 164 6.5 示例:位向量类型 165 6.6 封装 168 第7章 接口 171 7.1 作为规约的接口 171 7.2 接口类型 174 7.3 接口约定的达成 175 7.4 使用flag.Value进行标志位分析 179 7.5 作为值的接口 181 7.6 使用sort.Interface进行排序 186 7.7 http.Handler接口 191 7.8 错误接口 196 7.9 示例:表达式评估器 197 7.10 类型断言 205 7.11 使用类型断言分辨错误 206 7.12 使用接口类型断言查询行为 208 7.13 按类型的程序分支 210 7.14 示例:基于标记符号的XML解码 213 7.15 几句建议 216 第8章 goroutine和信道 217 8.1 goroutine 217 8.2 示例:并发时钟服务器 219 8.3 示例:并发回声服务器 222 8.4 信道 225 8.5 并行循环 234 8.6 示例:并发Web爬虫 239 8.7 使用select实现多工 244 8.8 示例:并发目录遍历 247 8.9 取消执行 251 8.10 示例:聊天服务器 253 第9章 使用共享变量实现并发 257 9.1 竞险 257 9.2 互斥量:sync.Mutex 262 9.3 读写互斥量:sync.RWMutex 266 9.4 内存同步 267 9.5 缓式初始化:sync.Once 268 9.6 竞险检测器 271 9.7 示例:并发无阻塞式高速缓存 272 9.8 goroutine和线程 280 第10章 包和go工具 283 10.1 概述 283 10.2 导入路径 284 10.3 包声明 285 10.4 导入声明 285 10.5 空导入 286 10.6 包和命名 289 10.7 go工具 290 第11章 测试 301 11.1 go test工具 302 11.2 测试函数 302 11.3 覆盖率 318 11.4 性能基准函数 321 11.5 性能剖析 323 11.6 示例函数 326 第12章 反射 329 12.1 为什么会引入反射概念 329 12.2 reflect.Type和reflect.Value 330 12.3 递归值输出Display 333 12.4 示例:对S-表达式编码 338 12.5 使用reflect.Value给变量设置值 341 12.6 示例:对S-表达式解码 344 12.7 访问结构体域标签 348 12.8 列出类型的方法 351 12.9 几句忠告 352 第13章 低阶程序设计 353 13.1 unsafe.Sizeof、Alignof和Offsetof 354 13.2 unsafe.Pointer 356 13.3 示例:深等价 358 13.4 使用cgo调用C代码 361 13.5 再来几句忠告 366 1. Tutoria 1 1.1. Hello, World1 1.2.?Command?L?ineArguments?4 1.3.?FindingDup?lic?ateLines?8 1.4.?Animated?GIFs?13 1.5.?FetchingaURL?15 1.6.?FetchingURLs?Con?cur?rently17 1.7.?AWe?bServer?19 1.8.?Loose?End?s232.? 2.?ProgramStr?ucture27 2.1.?Names?27 2.2.?Declarat?ions?28 2.3.?Var?iables?30 2.4.?Assig?nments?36 2.5.?Typ?eDecl?arat?ions?39 2.6.?Packages?andFiles?41 2.7.?Scope?45 3.?Basic?Data?Typ?es51 3.1.?Int?egers?51 3.2.?Float?ing?Point?Numbers?56 3.3.?Complex?Numbers?61 3.4.?Boole?ans63 3.5.?Str?ings64 3.6.?Con?stants75 4.?Com?positeTyp?es81 4.1.?Arrays?81 4.2.?Slices?84 4.3.?Maps?93 4.4.?Str?ucts99 4.5.?JSON107 4.6.?Text?andHTMLTempl?ates113 5.?Func?tions?119 5.1.?FunctionDeclarat?ions?119 5.2.?Rec?ursio 121 5.3..MultipleReturn Values.124 5.4..Errors 127 5.5..FunctionValues.132 5.6..Anonymous Functions.135 5.7..Variadic.Functions.142 5.8..Deferred.FunctionCalls 143 5.9..Panic.148 5.10..Recover 151 6..Methods 155 6.1..Method.Declarations.155 6.2..MethodswithaPointerReceiver 158 6.3..ComposingTypesby.Struct.Embedding 161 6.4..Method.Values.andExpressions.164 6.5..Example:.Bit.Vector.Type 165 6.6..Encapsulation 168 7..Interfaces 171 7.1..Interfaces.as.Contracts 171 7.2..Interface.Types 174 7.3..Interface.Satisfaction 175 7.4..ParsingFlags.withflag.Value 179 7.5..Interface.Values.181 7.6..Sortingwithsort.Interface 186 7.7..The http.Handler Interface.191 7.8..The error Interface.196 7.9..Example:.ExpressionEvaluator 197 7.10..Type Assertions.205 7.11..DiscriminatingErrorswith.TypeAssertions.206 7.12..QueryingBehaviorswith.Interface.TypeAssertions.208 7.13..Type Switches 210 7.14..Example:.Token-Based.XML.Decoding 213 7.15..AFew Words.ofAdvice.216 8..Goroutines.and.Channels.217 8.1..Goroutines 217 8.2..Example:.ConcurrentClockServer.219 8.3..Example:.ConcurrentEcho Server.222 8.4..Channels 225 8.5..Looping.inParallel 234 8.6..Example:.ConcurrentWeb.Crawler 239 8.7..Multiplexingwithselect 244 8.8..Example:.ConcurrentDirectoryTraversal 247 8.9..Cancellation 251 8.10..Example:.ChatSer.ver.253 9..Concurrency.withShared.Vari.ables 257 9.1..Race.Con.dit.ion.s 257 9.2..Mut.ual.Exc.lusion:sync.Mutex 262 9.3..Read/Write.Mut.exes:sync.RWMutex 266 9.4..Memor.ySy.nchro.nizat.ion 267 9.5..Lazy |

| 内容简介 | |
| Go语言是谷歌推出的一种全新的C语言风格的编程语言,可以在不损失应用程序性能的情况下降低代码的复杂性,提高编程效率,适合开发大型软件,有望成为主流的编程语言。本书由《C程序设计语言》的作者Kernighan和谷歌公司Go团队合作编写而成,是关于Go语言编程的权威著作。 |
- 机械工业出版社旗舰店 (微信公众号认证)
- 扫描二维码,访问我们的微信店铺
- 随时随地的购物、客服咨询、查询订单和物流...