Go Fundamentals Book by Mark Bates at Bookstore - Bookswagon
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology > Computer programming / software engineering > Programming and scripting languages: general > Go Fundamentals: Gopher Guides
Go Fundamentals: Gopher Guides

Go Fundamentals: Gopher Guides


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

Start Writing Production-Ready Go Code Fast

Thousands of developers and teams want to start taking advantage of Go, the powerful language used in projects ranging from Kubernetes to Docker and Vault. Go Fundamentals is specifically designed to get you up-to-speed fast, to leverage your existing knowledge of other languages, and to help you avoid common mistakes made by Go newcomers.

Based on author Mark Bates's and Cory LaNou's pioneering Gopher Guides training curricula, this guide will allow you to quickly understand and use Go syntax, core features, and idioms. Reflecting Go through version 1.18--which includes Go's exciting new support for generics--this guide prepares you to write robust, reliable, well-performing production code right from the outset.

  • Learn how Go manages packages, modules, and dependencies
  • Apply Go basics, such as variable declaration, types, and control flow
  • Work effectively with collection types, iteration, functions, structs, and pointers
  • Understand Go Slices and use them properly
  • Write idiomatic Go, using principles such as embedding and composition
  • Expertly use concurrency to improve code performance
  • Create proper tests to quickly identify and fix problems
  • Write simpler, better code with generics and interfaces
  • Take advantage of channels, context, sync primatives, and other advanced features

Go is lightweight, simple, and perfect for modern cloud-native and microservices development, which is why Go developers are in such high demand. With this guide and six months' experience with any modern programming language, you'll have what you need to leap into Go programming.

Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.



Table of Contents:

Foreword xxi
Preface xxiii
Acknowledgments xxxi
About the Authors xxxv

Chapter 1: Modules, Packages, and Dependencies 1
Modules 1
Packages 4
Folders, Files, and Organization 6
Importing Packages and Modules 13
Dependencies 16
Summary 25

Chapter 2: Go Language Basics 27
Go Language Overview 27
Numbers 31
Strings 35
UTF-8 37
Variables 40
Constants 48
Naming Identifiers 51
Printing and Formatting 57
Summary 75

Chapter 3: Arrays, Slices, and Iteration 77
List Types: Arrays and Slices 77
How Slices Work 90
Iteration 104
Summary 110

Chapter 4: Maps and Control Structures 111
Maps 111
If Statements 129
Switch Statements 135
Summary 140

Chapter 5: Functions 141
Function Definitions 141
Variadic Arguments 151
Deferring Function Calls 156
Init 162
Summary 166

Chapter 6: Structs, Methods, and Pointers 167
Structs 167
Methods 176
Pointers 182
Nil Receivers 191
Summary 193

Chapter 7: Testing 195
Testing Basics 195
Code Coverage 202
Table Driven Testing 206
Running Tests 213
Test Helpers 222
Summary 229

Chapter 8: Interfaces 231
Concrete Types versus Interfaces 231
Explicit Interface Implementation 233
Implicit Interface Implementation 234
Before Interfaces 235
Using Interfaces 237
Implementing io.Writer 239
Multiple Interfaces 241
Asserting Interface Implementation 241
The Empty Interface 242
Defining Interfaces 243
Embedding Interfaces 249
Type Assertion 250
Assertions through Switch 252
Using Assertions 255
Summary 257

Chapter 9: Errors 259
Errors as Values 259
Panic 264
Don't Panic 273
Custom Errors 289
Wrapping and Unwrapping Errors 294
Errors As/Is 301
Stack Traces 307
Summary 309

Chapter 10: Generics 311
What Are Generics? 311
Summary 334

Chapter 11: Channels 335
Concurrency and Parallelism 335
Go's Concurrency Model 338
Communicating with Channels 342
Unidirectional Channels 351
Closing Channels 352
Buffered Channels 358
Capturing System Signals with Channels 363
Summary 371

Chapter 12: Context 373
The Context Interface 374
Context Rules 380
Context Nodal Hierarchy 381
Context Values 384
Problems with String Keys 388
Securing Context Keys and Values 393
Cancellation Propagation with Contexts 396
Timeouts and Deadlines 405
Context Errors 408
Listening for System Signals with Context 411
Summary 416

Chapter 13: Synchronization 419
Waiting for Goroutines with a WaitGroup 419
Error Management with Error Groups 433
Data Races 443
Synchronizing Access with a Mutex 447
Performing Tasks Only Once 459
Summary 466

Chapter 14: Working with Files 467
Directory Entries and File Information 467
Walking Directories 473
Skipping Directories and Files 477
Creating Directories and Subdirectories 481
File Path Helpers 484
Creating Multiple Directories 489
Creating Files 492
Fixing the Walk Tests 497
Appending to Files 500
Reading Files 503
Beware of Windows 505
The FS Package 506
Using the FS Interface 510
Mocking a File System 513
Embedding Files 517
Summary 522

Index 523



About the Author :

Mark Bates is co-founder and instructor at Gopher Guides, the industry leader for Go training, consulting, and conference workshops. Since 2000, he has worked with some of the world's largest, most innovative companies, including Apple, Uber, and Visa. Mark discovered Go in 2013 and has attended GopherCon and hosted their lightning talks. He has spoken at conferences around the world and is a regular on the Go Time podcast.

Cory LaNou, Gopher Guides cofounder and instructor, is a full stack technologist who has specialized in start-ups for the last 20 years. Cory has deep ties to the Go community, having started one of the very first Go meetups in the world, Denver Gophers. Using his real world experience from working on projects such as InfluxDB, a highly scalable database written in Go, he has published numerous practical Go training courses and articles.


Best Sellers


Product Details
  • ISBN-13: 9780137918331
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison Wesley
  • Language: English
  • Sub Title: Gopher Guides
  • ISBN-10: 013791833X
  • Publisher Date: 08 Dec 2022
  • Binding: Digital download
  • No of Pages: 576


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Go Fundamentals: Gopher Guides
Pearson Education (US) -
Go Fundamentals: Gopher Guides
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Go Fundamentals: Gopher Guides

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!