Go language programming (written by qiniu cloud storage Team)
Basic Information
Author: Xu Shiwei Lu Guihua
Series name: Turing original
Press: People's post and telecommunications Press
ISBN: 9787115290366
Mounting time:
Published on: February 1, August 2012
Start: 16
Page number: 1
Version: 1-1
Category: Computer> Software and programming> integration> advanced programming language design
For more information, go programming (written by qiniu cloud storage Team)
Content Overview books
Computer books
Go language programming first guides readers to quickly view the full picture of the Go language, Quickly eliminating the strangeness of the language, then, we gradually introduced the process-oriented and object-oriented programming syntax of the Go language, interspersed with some comparisons with other mainstream languages to help readers understand the design motivations of the Go language, next, we discussed the important parallel programming methods of the Go language, and introduced non-syntactic-related but very important content such as network programming, engineering management, security programming, and development tools, finally, a column of articles on the go language can help readers better understand this brand-new language.
Go programming is suitable for developers at all levels.
Directory
Go Programming
Chapter 1 first knowledge of Go language 1
1.1 brief introduction to language 1
1.2 Language Feature 2
1.2.1 automatic garbage collection 3
1.2.2 richer built-in types 4
1.2.3 multiple function return values 5
1.2.4 error handling 6
1.2.5 anonymous functions and closures 6
1.2.6 types and interfaces 7
1.2.7 concurrent programming 8
1.2.8 reflection 9
1.2.9 language interaction 10
1.3 first go Program 11
1.3.1 code explanation 11
1.3.2 compiling environment preparation 12
1.3.3 compile the program 12
1.4 select 13 development tools
1.5 Project Management 13
1.6 problem tracking and debugging 18
1.6.1 print log 18
1.6.2 GDB debugging 18
1.7 How to seek help 18
1.7.1 email list 19
1.7.2 website resource 19
1.8 Conclusion 19
Chapter 2 sequential programming 20
2.1 variable 20
2.1.1 variable Declaration 20
2.1.2 variable initialization 21
2.1.3 variable value assignment 21
2.1.4 anonymous variable 22
2.2 constant 22
2.2.1 literal constant 22
2.2.2 constant definition 23
2.2.3 predefined constant 23
2.2.4 enumeration 24
2.3 type 24
2.3.1 Boolean 25
2.3.2 integer 25
2.3.3 floating point 27
2.3.4 plural type 28
2.3.5 string 28
2.3.6 character type 30
2.3.7 Array 31
2.3.8 array slicing 32
2.3.9 map 36
2.4 Process Control 38
2.4.1 Condition Statement 38
2.4.2 SELECT statement 39
2.4.3 loop statement 40
2.4.4 jump statement 41
2.5 functions 41
2.5.1 Function Definition 42
2.5.2 function call 42
2.5.3 indefinite parameter 43
2.5.4 multiple return values 45
2.5.5 anonymous functions and closures 45
2.6 error handling 47
2.6.1 error interface 47
2.6.2 defer 48
2.6.3 panic () and recover () 49
2.7 complete example 50
2.7.1 program structure 51
2.7.2 main program 51
2.7.3 Algorithm Implementation 54
2.7.4 main program 57
2.7.5 build and execute 59
2.8 summary 61
Chapter 2 Object-Oriented Programming 62
3.1 type system 62
3.1.1 Add method 63 for Type
3.1.2 value semantics and reference semantics 66
3.1.3 struct 67
3.2 initialization 68
3.3 anonymous combination 68
3.4 visibility 71
3.5 interface 71
3.5.1 interfaces in other languages 71
3.5.2 non-intrusive interface 73
3.5.3 interface value 74
3.5.4 interface query 76
3.5.5 type query 78
3.5.6 interface combination 78
3.5.7 any type 79
3.6 complete example 79
3.6.1 music library 80
3.6.2 play music 82
3.6.3 main program 84
3.6.4 build run 86
3.6.5 86 issues left behind
3.7 summary 87
Chapter 2 Concurrent Programming 88
4.1 concurrency basics 88
4.2 coroutine 90
4.3 goroutine 90
4.4 concurrent communication 91
4.5 channel 94
4.5.1 basic syntax 95
4.5.2 select 95
4.5.3 buffer mechanism 96
4.5.4 timeout mechanism 97
4.5.5 channel transfer 98
4.5.6 unidirectional channel 98
4.5.7 disable channel 99
4.6 multi-core parallel processing 100
4.7 transfer time slice 101
4.8 synchronization 101
4.8.1 synchronization lock 101
4.8.2 global uniqueness operation 102
4.9 complete example 103
4.9.1 simple IPC framework 105
4.9.2 central server 108
4.9.3 main program 113
4.9.4 run program 116
4.10 conclusion 117
Chapter 2 network programming 5th
5.1 socket programming 118
5.1.1 dial (): function 118
5.1.2 ICMP sample program 119
5.1.3 TCP sample program 121
5.1.4 richer network communication 122
5.2 HTTP programming 124
5.2.1 HTTP client 124
5.2.2 HTTP server 130
5.3 RPC programming 132
5.3.1 RPC support and
Process 132
5.3.2 about Gob 134
5.3.3 design an elegant RPC interface 134
5.4 JSON processing 135
5.4.1 encoded in JSON Format 136
5.4.2 decodes 137 of JSON data
5.4.3 Decoding of JSON data of unknown structures 138
5.4.4 stream read/write 140 of JSON
5.5 website development 140
5.5.1 simplest website program 141
5.5.2 net/HTTP packet introduction 141
5.5.3 develop a simple album website 142
5.6 conclusion 157
Chapter 2 security programming 6th
6.1 Data Encryption 158
6.2 digital signature 158
6.3 digital certificate 159
6.4 PKI system 159
6.5 go hash function 159
6.6 encrypted communication 160
6.6.1 encrypted communication process 161
6.6.2 162
6.6.3 File Server 165 that supports https
6.6.4 Echo program 166 based on SSL/TLS
6.7 Conclusion 169
Chapter 2 project management 7th
7.1 go command line tool 170
7.2 code style 172
7.2.1 mandatory encoding specification 172
7.2.2 non-mandatory encoding style 173
7.3 remote import supports 175
7.4 engineering organization 175
7.4.1g opath 176
7.4.2 directory 176
7.5 document management 177
7.6 project construction 180
7.7 cross-platform development 180
7.7.1 cross-compilation 181
7.7.2 Android 182
7.8 unit test 183
7.9 packaging and distribution 184
7.10 conclusion 184
Chapter 2 development tools 8th
8.1 select development tools 186
8.2 gedit 187
8.2.1 syntax highlighting 187
8.2.2 compiling environment 187
8.3 Vim 188
8.4 eclipse 189
8.5 notepad ++ 192
8.5.1 syntax highlight 192
8.5.2 compiling environment 192
8.6 liteide 193
8.7 conclusion 195
Chapter 2 advanced topics 9th
9.1 reflection 196
9.1.1 concepts 196
9.1.2 basic use 197
9.1.3 structure reflection operation 199
9.2 language interaction 199
9.2.1 type ing 200
9.2.2 string ing 201
9.2.3 C program 201
9.2.4 function call 202
9.2.5 compile the CGO 203
9.3 link symbol 203
9.4 goroutine mechanism 204
9.4.1 corouton 204
9.4.2 coroutine C language implementation 205
9.4.3 coroutine database overview 205
9.4.4 task 208
9.4.5 task scheduling 210
9.4.6 context switch 211
9.4.7 communication 215
9.5 interface mechanism 216
9.5.1 type assigned to interface 217
9.5.2 interface query 223
9.5.3 interface value assignment 224
Exhibit A 225
This book is from: China Interactive publishing network