Go程序设计语言-(英文版)

本书特色

[

go语言是谷歌推出的一种全新的c语言风格的编程语言,可以在不损失应用程序性能的情况下降低代码的复杂性,提高编程效率,适合开发大型软件,有望成为主流的编程语言。本书由《c程序设计语言》的作者kernighan和谷歌公司go团队合作编写而成,是关于go语言编程的权威著作。

]

目录

目  录第1章 综述 11.1 hello,world 11.2 命令行参数 41.3 查找重复行 81.4 gif动画 131.5 获取一个url 151.6 并发获取多个url 171.7 实现一个web服务器 191.8 杂项 23第2章 程序结构 272.1 名字 272.2 声明 282.3 变量 302.4 赋值 362.5 类型声明 392.6 包和文件 412.7 作用域 45第3章 基本数据类型 513.1 整数 513.2 浮点数 563.3 复数 613.4 布尔量 633.5 字符串 643.6 常量 75第4章 复合类型 814.1 数组 814.2 切片 844.3 键值对 934.4 结构体 994.5 json 1074.6 文本和html模板 113第5章 函数 1195.1 函数声明 1195.2 递归 1215.3 多返回值 1245.4 错误 1275.5 作为值的函数 1325.6 匿名函数 1355.7 变参函数 1425.8 延后函数调用 1435.9 崩溃 1485.10 恢复 151第6章 方法 1556.1 方法声明 1556.2 带有指针接收器的方法 1586.3 包含嵌入结构体的复合类型 1616.4 作为值和表达式的方法 1646.5 示例:位向量类型 1656.6 封装 168第7章 接口 1717.1 作为规约的接口 1717.2 接口类型 1747.3 接口约定的达成 1757.4 使用flag.value进行标志位分析 1797.5 作为值的接口 1817.6 使用sort.interface进行排序 1867.7 http.handler接口 1917.8 错误接口 1967.9 示例:表达式评估器 1977.10 类型断言 2057.11 使用类型断言分辨错误 2067.12 使用接口类型断言查询行为 2087.13 按类型的程序分支 2107.14 示例:基于标记符号的xml解码 2137.15 几句建议 216第8章 goroutine和信道 2178.1 goroutine 2178.2 示例:并发时钟服务器 2198.3 示例:并发回声服务器 2228.4 信道 2258.5 并行循环 2348.6 示例:并发web爬虫 2398.7 使用select实现多工 2448.8 示例:并发目录遍历 2478.9 取消执行 2518.10 示例:聊天服务器 253第9章 使用共享变量实现并发 2579.1 竞险 2579.2 互斥量:sync.mutex 2629.3 读写互斥量:sync.rwmutex 2669.4 内存同步 2679.5 缓式初始化:sync.once 2689.6 竞险检测器 2719.7 示例:并发无阻塞式高速缓存 2729.8 goroutine和线程 280第10章 包和go工具 28310.1 概述 28310.2 导入路径 28410.3 包声明 28510.4 导入声明 28510.5 空导入 28610.6 包和命名 28910.7 go工具 290第11章 测试 30111.1 go test工具 30211.2 测试函数 30211.3 覆盖率 31811.4 性能基准函数 32111.5 性能剖析 32311.6 示例函数 326第12章 反射 32912.1 为什么会引入反射概念 32912.2 reflect.type和reflect.value 33012.3 递归值输出display 33312.4 示例:对s-表达式编码 33812.5 使用reflect.value给变量设置值 34112.6 示例:对s-表达式解码 34412.7 访问结构体域标签 34812.8 列出类型的方法 35112.9 几句忠告 352第13章 低阶程序设计 35313.1 unsafe.sizeof、alignof和offsetof 35413.2 unsafe.pointer 35613.3 示例:深等价 35813.4 使用cgo调用c代码 36113.5 再来几句忠告 3661. tutoria 11.1. hello, world11.2.?command?l?inearguments?41.3.?findingdup?lic?atelines?81.4.?animated?gifs?131.5.?fetchingaurl?151.6.?fetchingurls?con?cur?rently171.7.?awe?bserver?191.8.?loose?end?s232.?2.?programstr?ucture272.1.?names?272.2.?declarat?ions?282.3.?var?iables?302.4.?assig?nments?362.5.?typ?edecl?arat?ions?392.6.?packages?andfiles?412.7.?scope?453.?basic?data?typ?es513.1.?int?egers?513.2.?float?ing?point?numbers?563.3.?complex?numbers?613.4.?boole?ans633.5.?str?ings643.6.?con?stants754.?com?positetyp?es814.1.?arrays?814.2.?slices?844.3.?maps?934.4.?str?ucts994.5.?json1074.6.?text?andhtmltempl?ates1135.?func?tions?1195.1.?functiondeclarat?ions?1195.2.?rec?ursio 1215.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.initializat.ion:sync.once 268 9.6..therace.detec.tor.271 9.7..example:.con.cur.rentnon-blo.cking.cache.272 9.8..goroutinesand.threads.280 10..pack.ages and.the.gotool 283 10.1..int.roduc.tion 283 10.2..imp.ort.pat.hs 284 10.3..thepackagedeclarat.ion 285 10.4..imp.ort.declarat.ions.285 10.5..blank.imp.orts 286 10.6..packages.andnaming 289 10.7..thegotool 290 11..testing.301 11.1..the go.test to.ol 302 11.2. test func.tions.302 11.3..cov.erage 318 11.4. benchmark func.tions.321 11.5..pro.ling 323 11.6. example func.tions.326 12..re.ecti.on 329 12.1..why.re.ec.tion? 329 12.2. reflect.type and reflect.value 330 12.3. display,arec.ursivevalue.print.er 333 12.4..example:.enco.dings-e.xpressions.338 12.5..setting.var.iables.wit.hreflect.value 341 12.6..example:.decodings-e.xpressions.344 12.7..accessingstr.uct.field.tags.348 12.8..displaying.the.met.hodsofatyp.e 351 12.9..awo.rdofcaution.352 13..low-l.evel.pro.gramming 353 13.1. unsafe.sizeof, alignof,and offsetof 354 13.2. unsafe.pointer 356 13.3..example:.deepequivalence.358 13.4..cal.lingccodewit.hcgo 361 13.5..another.wordofcaution.366

封面

Go程序设计语言-(英文版)

书名:Go程序设计语言-(英文版)

作者:多诺万

页数:366

定价:¥79.0

出版社:机械工业出版社

出版日期:2016-01-01

ISBN:9787111526285

PDF电子书大小:49MB 高清扫描完整版

百度云下载:http://www.chendianrong.com/pdf

发表评论

邮箱地址不会被公开。 必填项已用*标注