Go Programming Language, The - Donovan Alan A. A., Kernighan Brian W.

Donovan Alan A. A., Kernighan Brian W.

Go Programming Language, The

eBook Ausgabe. Empfohlen von 18 bis 67 Jahre. 1. Auflage. Electronic book text. Sprachen: Englisch
eBook (pdf), 400 Seiten
EAN 9780134190556
Veröffentlicht Oktober 2015
Verlag/Hersteller Pearson ITP

Auch erhältlich als:

Buch (Softcover)
44,99
36,49 inkl. MwSt.
Teilen
Beschreibung

The Go Programming Language is the authoritative resource for any programmer who wants to learn Go. It shows how to write clear and idiomatic Go to solve real-world problems. The book does not assume prior knowledge of Go nor experience with any specific language, so you'll find it accessible whether you're most comfortable with JavaScript, Ruby, Python, Java, or C++. - The first chapter is a tutorial on the basic concepts of Go, introduced through programs for file I/O and text processing, simple graphics, and web clients and servers. - Early chapters cover the structural elements of Go programs: syntax, control flow, data types, and the organization of a program into packages, files, and functions. The examples illustrate many packages from the standard library and show how to create new ones of your own. Later chapters explain the package mechanism in more detail, and how to build, test, and maintain projects using the go tool. - The chapters on methods and interfaces introduce Go's unconventional approach to object-oriented programming, in which methods can be declared on any type and interfaces are implicitly satisfied. They explain the key principles of encapsulation, composition, and substitutability using realistic examples. - Two chapters on concurrency present in-depth approaches to this increasingly important topic. The first, which covers the basic mechanisms of goroutines and channels, illustrates the style known as communicating sequential processes for which Go is renowned. The second covers more traditional aspects of concurrency with shared variables. These chapters provide a solid foundation for programmers encountering concurrency for the first time. - The final two chapters explore lower-level features of Go. One covers the art of metaprogramming using reflection. The other shows how to use the unsafe package to step outside the type system for special situations, and how to use the cgo tool to create Go bindings for C libraries. The book features hundreds of interesting and practical examples of well-written Go code that cover the whole language, its most important packages, and a wide range of applications. Each chapter has exercises to test your understanding and explore extensions and alternatives. Source code is freely available for download from http://gopl.io/ and may be conveniently fetched, built, and installed using the go get command.

Portrait

Alan A. A. Donovan is a member of Google's Go team in New York. He holds computer science degrees from Cambridge and MIT and has been programming in industry since 1996. Since 2005, he has worked at Google on infrastructure projects and was the co-designer of its proprietary build system, Blaze. He has built many libraries and tools for static analysis of Go programs, including oracle, godoc -analysis, eg, and gorename. Brian W. Kernighan is a professor in the Computer Science Department at Princeton University. He was a member of technical staff in the Computing Science Research Center at Bell Labs from 1969 until 2000, where he worked on languages and tools for Unix. He is the co-author of several books, including The C Programming Language, Second Edition (Prentice Hall, 1988), and The Practice of Programming (Addison-Wesley, 1999).

Inhaltsverzeichnis

Preface xi Chapter 1: Tutorial 1 1.1 Hello, World 1 1.2 Command-Line Arguments 4 1.3 Finding Duplicate Lines 8 1.4 Animated GIFs 13 1.5 Fetching a URL 15 1.6 Fetching URLs Concurrently 17 1.7 A Web Server 19 1.8 Loose Ends 23 Chapter 2: Program Structure 27 2.1 Names 27 2.2 Declarations 28 2.3 Variables 30 2.4 Assignments 36 2.5 Type Declarations 39 2.6 Packages and Files 41 2.7 Scope 45 Chapter 3: Basic Data Types 51 3.1 Integers 51 3.2 Floating-Point Numbers 56 3.3 Complex Numbers 61 3.4 Booleans 63 3.5 Strings 64 3.6 Constants 75 Chapter 4: Composite Types 81 4.1 Arrays 81 4.2 Slices 84 4.3 Maps 93 4.4 Structs 99 4.5 JSON 107 4.6 Text and HTML Templates 113 Chapter 5: Functions 119 5.1 Function Declarations 119 5.2 Recursion 121 5.3 Multiple Return Values 124 5.4 Errors 127 5.5 Function Values 132 5.6 Anonymous Functions 135 5.7 Variadic Functions 142 5.8 Deferred Function Calls 143 5.9 Panic 148 5.10 Recover 151 Chapter 6:. Methods 155 6.1 Method Declarations 155 6.2 Methods with a Pointer Receiver 158 6.3 Composing Types by Struct Embedding 161 6.4 Method Values and Expressions 164 6.5 Example: Bit Vector Type 165 6.6 Encapsulation 168 Chapter 7: Interfaces 171 7.1 Interfaces as Contracts 171 7.2 Interface Types 174 7.3 Interface Satisfaction 175 7.4 Parsing Flags with flag.Value 179 7.5 Interface Values 181 7.6 Sorting with sort.Interface 186 7.7 The http.Handler Interface 191 7.8 The error Interface 196 7.9 Example: Expression Evaluator 197 7.10 Type Assertions 205 7.11 Discriminating Errors with Type Assertions 206 7.12 Querying Behaviors with Interface Type Assertions 208 7.13 Type Switches 210 7.14 Example: Token-Based XML Decoding 213 7.15 A Few Words of Advice 216 Chapter 8: Goroutines and Channels 217 8.1 Goroutines 217 8.2 Example: Concurrent Clock Server 219 8.3 Example: Concu rent Echo Server 222 8.4 Channels 225 8.5 Looping in Parallel 234 8.6 Example: Concurrent Web Crawler 239 8.7 Multiplexing with select 244 8.8 Example: Concurrent Directory Traversal 247 8.9 Cancellation 251 8.10 Example: Chat Server 253 Chapter 9: Concurrency with Shared Variables 257 9.1 Race Conditions 257 9.2 Mutual Exclusion: sync.Mutex 262 9.3 Read/Write Mutexes: sync.RWMutex 266 9.4 Memory Synchronization 267 9.5 Lazy Initialization: sync.Once 268 9.6 The Race Detector 271 9.7 Example: Concurrent Non-Blocking Cache 272 9.8 Goroutines and Threads 280 Chapter 10: Packages and the Go Tool 283 10.1 Introduction 283 10.2 Import Paths 284 10.3 The Package Declaration 285 10.4 Import Declarations 285 10.5 Blank Imports 286 10.6 Packages and Naming 289 10.7 The Go Tool 290 Chapter 11: Testing 301 11.1 The go test Tool 302 11.2 Test Functions 302 11.3 Coverage 318 11.4 Benchmark Functions 321 11.5 Profiling 323 11.6 Example Functions 326 Chapter 12: Reflection 329 12.1 Why Reflection? 329 12.2 reflect.Type and reflect.Value 330 12.3 Display, a Recursive Value Printer 333 12.4 Example: Encoding S-Expressions 338 12.5 Setting Variables with reflect.Value 341 12.6 Example: Decoding S-Expressions 344 12.7 Accessing Struct Field Tags 348 12.8 Displaying the Methods of a Type 351 12.9 A Word of Caution 352 Chapter 13: Low-Level Programming 353 13.1 unsafe.Sizeof, Alignof, and Offsetof 354 13.2 unsafe.Pointer 356 13.3 Example: Deep Equivalence 358 13.4 Calling C Code with cgo 361 13.5 Another Word of Caution 366 Index 367

Technik
Sie können dieses eBook zum Beispiel mit den folgenden Geräten lesen:
• tolino Reader 
Laden Sie das eBook direkt über den Reader-Shop auf dem tolino herunter oder übertragen Sie das eBook auf Ihren tolino mit einer kostenlosen Software wie beispielsweise Adobe Digital Editions. 
• Sony Reader & andere eBook Reader 
Laden Sie das eBook direkt über den Reader-Shop herunter oder übertragen Sie das eBook mit der kostenlosen Software Sony READER FOR PC/Mac oder Adobe Digital Editions auf ein Standard-Lesegeräte. 
• Tablets & Smartphones 
Möchten Sie dieses eBook auf Ihrem Smartphone oder Tablet lesen, finden Sie hier unsere kostenlose Lese-App für iPhone/iPad und Android Smartphone/Tablets. 
• PC & Mac 
Lesen Sie das eBook direkt nach dem Herunterladen mit einer kostenlosen Lesesoftware, beispielsweise Adobe Digital Editions, Sony READER FOR PC/Mac oder direkt über Ihre eBook-Bibliothek in Ihrem Konto unter „Meine eBooks“ -  „Sofort online lesen über Meine Bibliothek“.
 
Bitte beachten Sie, dass die Kindle-Geräte das Format nicht unterstützen und dieses eBook somit nicht auf Kindle-Geräten lesbar ist.
Hersteller
Libri GmbH
Friedensallee 273

DE - 22763 Hamburg

E-Mail: GPSR@libri.de

Website: www.libri.de

Das könnte Sie auch interessieren

Orwell George Orwell
Animal Farm
eBook (epub)
Sofort lieferbar (Download)
0,00
Rachel Reid
Heated Rivalry
eBook (epub)
Sofort lieferbar (Download)
5,33
Rachel Reid
The Long Game
eBook (epub)
Sofort lieferbar (Download)
5,33
Robert Galbraith
The Hallmarked Man
eBook (epub)
Sofort lieferbar (Download)
16,99
Rachel Reid
Game Changer
eBook (epub)
Sofort lieferbar (Download)
5,33
Herman Melville
Moby Dick - classic
eBook (epub)
Sofort lieferbar (Download)
0,00
Ian McEwan
What We Can Know
eBook (epub)
Sofort lieferbar (Download)
14,99
Sofort lieferbar (Download)
0,00
Rachel Reid
Game Changers Collection
eBook (epub)
Sofort lieferbar (Download)
11,06
Ali Hazelwood
Mate
eBook (epub)
Sofort lieferbar (Download)
0,99
Rachel Reid
Game Changers Volume 2
eBook (epub)
Sofort lieferbar (Download)
11,06
Virginia Woolf
The Complete Works - Virginia Woolf
eBook (epub)
Sofort lieferbar (Download)
0,99
Rachel Reid
Tough Guy
eBook (epub)
Sofort lieferbar (Download)
5,33
Dan Brown
The Secret of Secrets
eBook (epub)
Sofort lieferbar (Download)
16,99
Rachel Reid
Role Model
eBook (epub)
Sofort lieferbar (Download)
5,33
Alison Espach
The Wedding People
eBook (epub)
Sofort lieferbar (Download)
0,99
Robert Jackson Bennett
The Tainted Cup
eBook (epub)
Sofort lieferbar (Download)
0,99
Bram Stoker
Dracula
eBook (epub)
Sofort lieferbar (Download)
0,00
Elizabeth George
A Slowly Dying Cause
eBook (epub)
Sofort lieferbar (Download)
15,99
Ali Hazelwood
The Love Hypothesis
eBook (epub)
Sofort lieferbar (Download)
0,99
Jane Austen
Emma
eBook (epub)
Sofort lieferbar (Download)
0,01
Richard Osman
The Impossible Fortune
eBook (epub)
Sofort lieferbar (Download)
14,99
Rachel Reid
Common Goal
eBook (epub)
Sofort lieferbar (Download)
5,33
Ali Hazelwood
Deep End
eBook (epub)
Sofort lieferbar (Download)
6,49
Ken Follett
Circle of Days
eBook (epub)
Sofort lieferbar (Download)
15,99
Ben Aaronovitch
Stone and Sky
eBook (epub)
Sofort lieferbar (Download)
12,99
Senlinyu
Alchemised
eBook (epub)
Sofort lieferbar (Download)
16,99
Ali Hazelwood
Bride
eBook (epub)
Sofort lieferbar (Download)
5,99
Rebecca Yarros
Onyx Storm
eBook (epub)
Sofort lieferbar (Download)
13,99
Rebecca Yarros
Fourth Wing
eBook (epub)
Sofort lieferbar (Download)
6,49
John Irving
Queen Esther
eBook (epub)
Sofort lieferbar (Download)
14,83
Emily Brontë
Wuthering Heights
eBook (epub)
Sofort lieferbar (Download)
0,00
Colleen Hoover
Finding Cinderella
eBook (epub)
Sofort lieferbar (Download)
0,00
Kaliane Bradley
The Ministry of Time
eBook (epub)
Sofort lieferbar (Download)
5,99
Richard Osman
The Thursday Murder Club
eBook (epub)
Sofort lieferbar (Download)
8,99
Mai Mochizuki
The Full Moon Coffee Shop
eBook (epub)
Sofort lieferbar (Download)
0,99