توضیحاتی در مورد کتاب Go Recipes: A Problem-Solution Approach
نام کتاب : Go Recipes: A Problem-Solution Approach
عنوان ترجمه شده به فارسی : Go Recipes: A Problem-Rحل رویکرد
سری :
نویسندگان : Davis, Ian
ناشر : Apress
سال نشر : 2016
تعداد صفحات : 248
ISBN (شابک) : 9781484211892 , 1484211898
زبان کتاب : English
فرمت کتاب : pdf
حجم کتاب : 6 مگابایت
بعد از تکمیل فرایند پرداخت لینک دانلود کتاب ارائه خواهد شد. درصورت ثبت نام و ورود به حساب کاربری خود قادر خواهید بود لیست کتاب های خریداری شده را مشاهده فرمایید.
فهرست مطالب :
Contents at a Glance......Page 5
Contents......Page 6
About the Author......Page 14
About the Technical Reviewer......Page 15
Introduction......Page 16
Introduction to Go......Page 17
How It Works......Page 18
Setting Up the Go Workspace......Page 21
How It Works......Page 22
How It Works......Page 24
How It Works......Page 26
Compiling the Package......Page 28
How It Works......Page 30
How It Works......Page 31
Formatting Go Code......Page 32
Vetting Go Code for Common Errors......Page 33
Go Documentation with GoDoc......Page 34
Problem......Page 35
Writing an Example Package......Page 36
Reusing Packages......Page 38
Using a Blank Identifier as a Package Alias......Page 40
Installing Third-Party Packages......Page 41
Declaring Functions......Page 42
Returning Multiple Values......Page 44
Variadic Functions......Page 45
Function Values, Anonymous Functions, and Closures......Page 46
Declaring and Initializing Arrays......Page 48
Iterating over Arrays......Page 49
Example Program......Page 50
Initializing Slices Using make Function......Page 52
Creating Slices Using a Slice Literal......Page 53
Enlarging Slices with copy and append Functions......Page 54
How It Works......Page 56
Working with Maps......Page 57
Iteration Order of Maps......Page 59
How It Works......Page 60
How It Works......Page 61
How It Works......Page 62
Solution......Page 63
How It Works......Page 64
How It Works......Page 67
Creating Instances of Struct Types......Page 68
Using User-Defined Types as the Type for Fields......Page 69
How It Works......Page 70
How It Works......Page 76
How It Works......Page 81
Implementing an Interface into Concrete Types......Page 82
How It Works......Page 89
Problem......Page 93
How It Works......Page 94
Communication with Channels......Page 95
Deadlock......Page 98
Example Program......Page 99
Receive Values Using Range Expression......Page 102
Solution......Page 103
How It Works......Page 104
Example with Channel Direction......Page 107
Solution......Page 108
How It Works......Page 109
How It Works......Page 113
Encoding JSON......Page 117
Decoding JSON......Page 118
Example: Encoding and Decoding......Page 119
Example: Encoding and Decoding with Struct Tags......Page 120
How It Works......Page 122
Example: A Basic Logger......Page 125
Example: A Configurable Logger......Page 128
io.Writer and io.Reader Interfaces......Page 132
Writing and Reading Tar Files......Page 133
Writing and Reading Zip Files......Page 138
How It Works......Page 142
Connecting to MongoDB......Page 143
Performing CRUD Operations......Page 144
Delete a Document from a Collection......Page 147
Read Documents from a Collection......Page 148
Solution......Page 154
Connecting to RethinkDB......Page 155
Performing CRUD Operations......Page 156
Update a Document in a Table......Page 158
Read a Document from a Table......Page 159
Changefeeds in RethinkDB......Page 165
Solution......Page 166
Line Protocol......Page 167
Working on InfluxDB with Go Client......Page 168
Connecting to InfluxDB......Page 169
Reading Points from InfluxDB......Page 170
Example: Writing and Reading on InfluxDB......Page 171
Working with PostgreSQL......Page 175
Working with MySQL......Page 176
Example with PostgreSQL Database......Page 177
Chapter 7: Building HTTP Servers......Page 181
How It Works......Page 182
Problem......Page 186
How It Works......Page 187
How It Works......Page 188
How It Works......Page 190
How It Works......Page 191
Solution......Page 192
How It Works......Page 193
How It Works......Page 195
Directory Structure of the Application......Page 196
Data Model......Page 198
Configuring REST API Resources into the HTTP Multiplexer......Page 199
Managing mgo.Session......Page 201
HTTP Handlers for Bookmarks Resource......Page 203
Data Persistence with MongoDB......Page 210
Running the HTTP Server......Page 211
Testing REST API Server......Page 213
How It Works......Page 216
Running Unit Tests......Page 218
Solution......Page 219
How It Works......Page 220
Problem......Page 221
How It Works......Page 222
How It Works......Page 223
How It Works......Page 225
How It Works......Page 227
An HTTP API Server......Page 228
Testing HTTP Applications Using ResponseRecorder......Page 229
Testing HTTP Application Using Server......Page 230
Building a Testable HTTP API Server......Page 232
Bootstrapping a Test Suite File......Page 237
Adding Specs to Suite......Page 238
Writing Specs in Test File......Page 239
Index......Page 246