The Go Programming Language Phrasebook (häftad)
Format
Häftad (Paperback)
Språk
Engelska
Antal sidor
288
Utgivningsdatum
2012-05-16
Upplaga
1
Förlag
ADDISON-WESLEY
Dimensioner
175 x 114 x 23 mm
Vikt
227 g
Antal komponenter
1
ISBN
9780321817143

The Go Programming Language Phrasebook

Häftad,  Engelska, 2012-05-16

Slutsåld

The Go Programming Language Phrasebook

Essential Go code and idioms for all facets of the development process

This guide gives you the code phrases you need to quickly and effectively complete a wide variety of projects with Go, todays most exciting new programming language.

Tested, easy-to-adapt code examples illuminate every step of Go development, helping you write highly scalable, concurrent software. Youll master Go-specific idioms for working with strings, collections, arrays, error handling, goroutines, slices, maps, channels, numbers, dates, times, files, networking, web apps, the runtime, and more.

Concise and Accessible

Easy to carry and easy to use: Ditch all those bulky books for one portable pocket guide



Flexible and Functional

Packed with more than 100 customizable code snippets: Quickly create solid Go code to solve just about any problem

Register your book at informit.com/register for convenient access to downloads, updates, and corrections as they become available.
Visa hela texten

Kundrecensioner

Har du läst boken? Sätt ditt betyg »

Övrig information

David Chisnall is a freelance writer and software developer, who has worked on compilers for numerous languages ranging from Smalltalk to GPU-based C++. He is an active contributor to a number of open source projects and occasionally visits academia to teach. He is the author of Cocoa Programming Developer's Handbook (Addison-Wesley, 2009) and Objective-C Phrasebook (Addison-Wesley, 2011). He lives in Swansea, Wales.

Innehållsförteckning

1 Introducing Go     1

Go and C     1

Why Go?     4

Goroutines and Channels     7

Selecting a Compiler     10

Creating a Simple Go Program     13

The Go Type System     14

Understanding the Memory Model     16

2 A Go Primer     21

The Structure of a Go Source File     23

Declaring Variables     26

Declaring Functions     29

Looping in Go     32

Creating Enumerations     35

Declaring Structures     37

Defining Methods     39

Implementing Interfaces     42

Casting Types     47

3 Numbers     51

Converting Between Strings and Numbers     52

Using Large Integers     54

Converting Between Numbers and Pointers    56

4 Common Go Patterns     61

Zero Initialization     62

Generic Data Structures     67

Specialized Generic Data Structures     69

Implementation Hiding    72

Type Embedding     75

5 Arrays and Slices     79

Creating Arrays     81

Slicing Arrays    83

Resizing Slices    85

Truncating Slices    87

Iterating Over Arrays    88

6 Manipulating Strings     91

Comparing Strings     92

Processing a String One Character at a Time     94

Processing a Partial String    96

Splitting and Trimming Strings     98

Copying Strings     102

Creating Strings from Patterns     102

Matching Patterns in Strings     104

7 Working with Collections     107

Creating a Map     108

Storing Unordered Groups of Objects     111

Using Lists     112

Defining New Collections     114

8 Handling Errors     117

Deferring Cleanup    118

Panicking and Recovering     121

Returning Error Values     125

Error Delegates    127

9 Goroutines    131

Creating Go...