{"product_id":"go-programming-language-for-dummies-isbn-9781119786191","title":"Go Programming Language For Dummies","description":"\u003cp\u003e\u003cb\u003eReady, set, program with Go! \u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eNow is the perfect time to learn the Go Programming Language. It’s one of the most in-demand languages among tech recruiters and developers love its simplicity and power. \u003ci\u003eGo Programming Language For Dummies\u003c\/i\u003e is an easy way to add this top job skill to your toolkit. Written for novice and experienced coders alike, this book traverses basic syntax, writing functions, organizing data, building packages, and interfacing with APIs. \u003c\/p\u003e \u003cp\u003eGo—or GoLang, as it’s also known—has proven to be a strong choice for developers creating applications for the cloud-based world we live in. This book will put you on the path to using the language that’s created some of  today’s leading web applications, so you can steer your career where you want to Go! \u003c\/p\u003e \u003cul\u003e \u003cli\u003eLearn how Go works and start writing programs and modules \u003c\/li\u003e \u003cli\u003eInstall and implement the most powerful third-party Go packages \u003c\/li\u003e \u003cli\u003eUse Go in conjunction with web services and MySQL databases \u003c\/li\u003e \u003cli\u003eKeep your codebase organized and use Go to structure data \u003c\/li\u003e \u003c\/ul\u003e \u003cp\u003eWith this book, you can join the growing numbers of developers using Go to create 21st century solutions. Step inside to take start writing code that puts data in users’ hands. \u003c\/p\u003e \u003cp\u003e\u003cb\u003eIntroduction \u003c\/b\u003e\u003cb\u003e1\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eAbout This Book 1\u003c\/p\u003e \u003cp\u003eFoolish Assumptions 2\u003c\/p\u003e \u003cp\u003eIcons Used in This Book 2\u003c\/p\u003e \u003cp\u003eBeyond the Book 3\u003c\/p\u003e \u003cp\u003eWhere to Go from Here 3\u003c\/p\u003e \u003cp\u003e\u003cb\u003ePart 1: Getting Started with Go 5\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 1: Hello, Go!\u003c\/b\u003e\u003cb\u003e 7\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eSeeing What Learning Go Can Do for You 8\u003c\/p\u003e \u003cp\u003eInstalling Go on Your Machine 9\u003c\/p\u003e \u003cp\u003emacOS 10\u003c\/p\u003e \u003cp\u003eWindows 11\u003c\/p\u003e \u003cp\u003eUsing an Integrated Development Environment with Go 12\u003c\/p\u003e \u003cp\u003eWriting Your First Go Program 14\u003c\/p\u003e \u003cp\u003eCompiling and running the program 15\u003c\/p\u003e \u003cp\u003eUnderstanding how a Go program works 17\u003c\/p\u003e \u003cp\u003eMaking sense of the Go file structure 18\u003c\/p\u003e \u003cp\u003eCompiling for multiple operating systems 19\u003c\/p\u003e \u003cp\u003eComparing Go with Other Languages 21\u003c\/p\u003e \u003cp\u003eSyntax 21\u003c\/p\u003e \u003cp\u003eCompilation 22\u003c\/p\u003e \u003cp\u003eConcurrency 22\u003c\/p\u003e \u003cp\u003eLibrary support 22\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 2: Working with Different Data Types\u003c\/b\u003e\u003cb\u003e 23\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eDeclaring Always-Changing Variables 24\u003c\/p\u003e \u003cp\u003eUsing the var keyword: Type-inferred variables 24\u003c\/p\u003e \u003cp\u003eSpecifying the data type: Explicitly typed variables 25\u003c\/p\u003e \u003cp\u003eUsing the short variable declaration operator 26\u003c\/p\u003e \u003cp\u003eDeclaring Never-Changing Constants 27\u003c\/p\u003e \u003cp\u003eRemoving Unused Variables 27\u003c\/p\u003e \u003cp\u003eDealing with Strings 29\u003c\/p\u003e \u003cp\u003ePerforming Type Conversions 30\u003c\/p\u003e \u003cp\u003eDiscovering the type of a variable 31\u003c\/p\u003e \u003cp\u003eConverting a variable’s type 32\u003c\/p\u003e \u003cp\u003eInterpolating strings 34\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 3: Making Decisions\u003c\/b\u003e\u003cb\u003e 37\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUsing If\/Else Statements to Make Decisions 37\u003c\/p\u003e \u003cp\u003eLaying the foundation for the if\/else statement: Logical and comparison operators 38\u003c\/p\u003e \u003cp\u003eUsing the if\/else statement 40\u003c\/p\u003e \u003cp\u003eShort-circuiting: Evaluating conditions in Go 42\u003c\/p\u003e \u003cp\u003eWhen You Have Too Many Conditions: Using the Switch Statement 46\u003c\/p\u003e \u003cp\u003eSwitching with fall-throughs 47\u003c\/p\u003e \u003cp\u003eMatching multiple cases 48\u003c\/p\u003e \u003cp\u003eSwitching without condition 48\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 4: Over and Over and Over: Using Loops\u003c\/b\u003e\u003cb\u003e 51\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003ePerforming Loops Using the for Statement 51\u003c\/p\u003e \u003cp\u003eIterating over a Range of Values 56\u003c\/p\u003e \u003cp\u003eIterating through arrays\/slices 56\u003c\/p\u003e \u003cp\u003eIterating through a string 58\u003c\/p\u003e \u003cp\u003eUsing Labels with the for Loop 59\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 5: Grouping Code into Functions\u003c\/b\u003e\u003cb\u003e 65\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eDefining a Function 65\u003c\/p\u003e \u003cp\u003eDefining functions with parameters 66\u003c\/p\u003e \u003cp\u003eDefining functions with multiple parameters 68\u003c\/p\u003e \u003cp\u003ePassing arguments by value and by pointer 68\u003c\/p\u003e \u003cp\u003eReturning values from functions 71\u003c\/p\u003e \u003cp\u003eNaming return values 72\u003c\/p\u003e \u003cp\u003eWorking with variadic functions 72\u003c\/p\u003e \u003cp\u003eUsing Anonymous Functions 73\u003c\/p\u003e \u003cp\u003eDeclaring an anonymous function 73\u003c\/p\u003e \u003cp\u003eImplementing closure using anonymous functions 74\u003c\/p\u003e \u003cp\u003eImplementing the filter() function using closure 76\u003c\/p\u003e \u003cp\u003e\u003cb\u003ePart 2: Working with Data Structures 79\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 6: Slicing and Dicing Using Arrays and Slices\u003c\/b\u003e\u003cb\u003e 81\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eArming Yourself to Use Arrays 81\u003c\/p\u003e \u003cp\u003eDeclaring an array 82\u003c\/p\u003e \u003cp\u003eInitializing an array 83\u003c\/p\u003e \u003cp\u003eWorking with multidimensional arrays 83\u003c\/p\u003e \u003cp\u003eSleuthing Out the Secrets of Slices 86\u003c\/p\u003e \u003cp\u003eCreating an empty slice 86\u003c\/p\u003e \u003cp\u003eCreating and initializing a slice 88\u003c\/p\u003e \u003cp\u003eAppending to a slice 88\u003c\/p\u003e \u003cp\u003eSlicing and Ranging 92\u003c\/p\u003e \u003cp\u003eExtracting part of an array or slice 92\u003c\/p\u003e \u003cp\u003eIterating through a slice 95\u003c\/p\u003e \u003cp\u003eMaking copies of an array or slice 95\u003c\/p\u003e \u003cp\u003eInserting an item into a slice 97\u003c\/p\u003e \u003cp\u003eRemoving an item from a slice 99\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 7: Defining the Blueprints of Your Data Using Structs \u003c\/b\u003e\u003cb\u003e101\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eDefining Structs for a Collection of Items 101\u003c\/p\u003e \u003cp\u003eCreating a Go Struct 104\u003c\/p\u003e \u003cp\u003eMaking a Copy of a Struct 105\u003c\/p\u003e \u003cp\u003eDefining Methods in Structs 107\u003c\/p\u003e \u003cp\u003eComparing Structs 110\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 8: Establishing Relationships Using Maps\u003c\/b\u003e\u003cb\u003e 113\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eCreating Maps in Go 113\u003c\/p\u003e \u003cp\u003eInitializing a map with a map literal 115\u003c\/p\u003e \u003cp\u003eChecking the existence of a key 115\u003c\/p\u003e \u003cp\u003eDeleting a key 116\u003c\/p\u003e \u003cp\u003eGetting the number of items in a map 116\u003c\/p\u003e \u003cp\u003eIterating over a map 117\u003c\/p\u003e \u003cp\u003eGetting all the keys in a map 117\u003c\/p\u003e \u003cp\u003eSetting the iteration order in a map 118\u003c\/p\u003e \u003cp\u003eSorting the items in a map by values 118\u003c\/p\u003e \u003cp\u003eUsing Structs and Maps in Go 121\u003c\/p\u003e \u003cp\u003eCreating a map of structs 121\u003c\/p\u003e \u003cp\u003eSorting a map of structs 124\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 9: Encoding and Decoding Data Using JSON\u003c\/b\u003e\u003cb\u003e 129\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eGetting Acquainted with JSON 129\u003c\/p\u003e \u003cp\u003eObject 130\u003c\/p\u003e \u003cp\u003eString 130\u003c\/p\u003e \u003cp\u003eBoolean 131\u003c\/p\u003e \u003cp\u003eNumber 131\u003c\/p\u003e \u003cp\u003eObject 132\u003c\/p\u003e \u003cp\u003eArray 132\u003c\/p\u003e \u003cp\u003enull 133\u003c\/p\u003e \u003cp\u003eDecoding JSON 134\u003c\/p\u003e \u003cp\u003eDecoding JSON to a struct 135\u003c\/p\u003e \u003cp\u003eDecoding JSON to arrays 136\u003c\/p\u003e \u003cp\u003eDecoding embedded objects 137\u003c\/p\u003e \u003cp\u003eMapping custom attribute names 140\u003c\/p\u003e \u003cp\u003eMapping unstructured data 141\u003c\/p\u003e \u003cp\u003eEncoding JSON 144\u003c\/p\u003e \u003cp\u003eEncoding structs to JSON 144\u003c\/p\u003e \u003cp\u003eEncoding interfaces to JSON 148\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 10: Defining Method Signatures Using Interfaces\u003c\/b\u003e\u003cb\u003e 151\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eWorking with Interfaces in Go 152\u003c\/p\u003e \u003cp\u003eDefining an interface 152\u003c\/p\u003e \u003cp\u003eImplementing an interface 153\u003c\/p\u003e \u003cp\u003eLooking at How You May Use Interfaces 154\u003c\/p\u003e \u003cp\u003eAdding methods to a type that doesn’t satisfy an interface 158\u003c\/p\u003e \u003cp\u003eUsing the Stringer interface 159\u003c\/p\u003e \u003cp\u003eImplementing multiple interfaces 160\u003c\/p\u003e \u003cp\u003eUsing an empty interface 161\u003c\/p\u003e \u003cp\u003eDetermining whether a value implements a specific interface 162\u003c\/p\u003e \u003cp\u003e\u003cb\u003ePart 3: Multitasking in Go 163\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 11: Threading Using Goroutines\u003c\/b\u003e\u003cb\u003e 165\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUnderstanding Goroutines 166\u003c\/p\u003e \u003cp\u003eUsing Goroutines with Shared Resources 168\u003c\/p\u003e \u003cp\u003eSeeing how shared resources impact goroutines 168\u003c\/p\u003e \u003cp\u003eAccessing shared resources using mutual exclusion 171\u003c\/p\u003e \u003cp\u003eUsing atomic counters for modifying shared resources 172\u003c\/p\u003e \u003cp\u003eSynchronizing Goroutines 174\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 12: Communicating between Goroutines Using Channels\u003c\/b\u003e\u003cb\u003e 179\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUnderstanding Channels 179\u003c\/p\u003e \u003cp\u003eHow channels work 180\u003c\/p\u003e \u003cp\u003eHow channels are used 183\u003c\/p\u003e \u003cp\u003eIterating through Channels 186\u003c\/p\u003e \u003cp\u003eAsynchronously Waiting on Channels 187\u003c\/p\u003e \u003cp\u003eUsing Buffered Channels 192\u003c\/p\u003e \u003cp\u003e\u003cb\u003ePart 4: Organizing Your Code 195\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 13: Using and Creating Packages in Go\u003c\/b\u003e\u003cb\u003e 197\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eWorking with Packages 197\u003c\/p\u003e \u003cp\u003eCreating shareable packages 200\u003c\/p\u003e \u003cp\u003eOrganizing packages using directories 202\u003c\/p\u003e \u003cp\u003eUsing Third-Party Packages 204\u003c\/p\u003e \u003cp\u003eEmojis for Go 204\u003c\/p\u003e \u003cp\u003eGo Documentation 205\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 14: Grouping Packages into Modules\u003c\/b\u003e\u003cb\u003e 211\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eCreating a Module 211\u003c\/p\u003e \u003cp\u003eTesting and Building a Module 214\u003c\/p\u003e \u003cp\u003ePublishing a Module on GitHub 216\u003c\/p\u003e \u003cp\u003e\u003cb\u003ePart 5: Seeing Go in Action 223\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 15: Consuming Web APIs Using Go\u003c\/b\u003e\u003cb\u003e 225\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUnderstanding Web APIs 225\u003c\/p\u003e \u003cp\u003eFetching Data from Web Services in Go 226\u003c\/p\u003e \u003cp\u003eWriting a Go program to connect to a web API 227\u003c\/p\u003e \u003cp\u003eDecoding JSON data 229\u003c\/p\u003e \u003cp\u003eRefactoring the code for decoding JSON data 233\u003c\/p\u003e \u003cp\u003eFetching from multiple web services at the same time 238\u003c\/p\u003e \u003cp\u003eReturning Goroutine’s results to the main() function 239\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 16: Getting Ready to Serve Using REST APIs\u003c\/b\u003e\u003cb\u003e 243\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eBuilding Web Services Using REST APIs 243\u003c\/p\u003e \u003cp\u003eHTTP messages 244\u003c\/p\u003e \u003cp\u003eREST URLs 244\u003c\/p\u003e \u003cp\u003eREST methods 246\u003c\/p\u003e \u003cp\u003eREST response 248\u003c\/p\u003e \u003cp\u003eCreating a REST API in Go 249\u003c\/p\u003e \u003cp\u003eGetting your REST API up and running 249\u003c\/p\u003e \u003cp\u003eTesting the REST API 251\u003c\/p\u003e \u003cp\u003eRegistering additional paths 251\u003c\/p\u003e \u003cp\u003ePassing in query string 254\u003c\/p\u003e \u003cp\u003eSpecifying request methods 255\u003c\/p\u003e \u003cp\u003eStoring the course information on the REST API 257\u003c\/p\u003e \u003cp\u003eTesting the REST API again 267\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 17: Working with Databases\u003c\/b\u003e\u003cb\u003e 271\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eSetting Up a MySQL Database Server 272\u003c\/p\u003e \u003cp\u003eInterfacing with the MySQL server 272\u003c\/p\u003e \u003cp\u003eCreating a database and table 274\u003c\/p\u003e \u003cp\u003eCreating a new account and granting permission 275\u003c\/p\u003e \u003cp\u003eConnecting to the MySQL Database in Go 276\u003c\/p\u003e \u003cp\u003eRetrieving a record 278\u003c\/p\u003e \u003cp\u003eAdding a record 280\u003c\/p\u003e \u003cp\u003eModifying a record 281\u003c\/p\u003e \u003cp\u003eDeleting a record 283\u003c\/p\u003e \u003cp\u003e\u003cb\u003ePart 6: The Part of Tens 285\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 18: Ten Useful Go Packages to Create Applications\u003c\/b\u003e\u003cb\u003e 287\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003ecolor 287\u003c\/p\u003e \u003cp\u003eInstallation 288\u003c\/p\u003e \u003cp\u003eCode sample 288\u003c\/p\u003e \u003cp\u003enow 288\u003c\/p\u003e \u003cp\u003eInstallation 288\u003c\/p\u003e \u003cp\u003eCode sample 288\u003c\/p\u003e \u003cp\u003ego-pushbullet 289\u003c\/p\u003e \u003cp\u003eInstallation 289\u003c\/p\u003e \u003cp\u003eCode sample 289\u003c\/p\u003e \u003cp\u003egoid 290\u003c\/p\u003e \u003cp\u003eInstallation 290\u003c\/p\u003e \u003cp\u003eCode sample 290\u003c\/p\u003e \u003cp\u003ejson2go 291\u003c\/p\u003e \u003cp\u003eInstallation 291\u003c\/p\u003e \u003cp\u003eCode sample 291\u003c\/p\u003e \u003cp\u003egojq 292\u003c\/p\u003e \u003cp\u003eInstallation 293\u003c\/p\u003e \u003cp\u003eCode sample 293\u003c\/p\u003e \u003cp\u003eturtle 294\u003c\/p\u003e \u003cp\u003eInstallation 294\u003c\/p\u003e \u003cp\u003eCode sample 294\u003c\/p\u003e \u003cp\u003ego-http-client 295\u003c\/p\u003e \u003cp\u003eInstallation 295\u003c\/p\u003e \u003cp\u003eCode sample 295\u003c\/p\u003e \u003cp\u003enotify 296\u003c\/p\u003e \u003cp\u003eInstallation 296\u003c\/p\u003e \u003cp\u003eCode sample 296\u003c\/p\u003e \u003cp\u003egosx-notifier 297\u003c\/p\u003e \u003cp\u003eInstallation 297\u003c\/p\u003e \u003cp\u003eCode sample 297\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 19: Ten Great Go Resources\u003c\/b\u003e\u003cb\u003e 299\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eThe Official Go Website 299\u003c\/p\u003e \u003cp\u003eGo by Example 300\u003c\/p\u003e \u003cp\u003eA Tour of Go 300\u003c\/p\u003e \u003cp\u003eThe Go Frequently Asked Questions 300\u003c\/p\u003e \u003cp\u003eThe Go Playground 300\u003c\/p\u003e \u003cp\u003eGo Bootcamp 301\u003c\/p\u003e \u003cp\u003eEffective Go 301\u003c\/p\u003e \u003cp\u003eGophercises 301\u003c\/p\u003e \u003cp\u003eTutorialspoint 301\u003c\/p\u003e \u003cp\u003eStack Overflow 302\u003c\/p\u003e \u003cp\u003eIndex 303\u003c\/p\u003e \u003cp\u003e\u003cb\u003eWei-Meng Lee\u003c\/b\u003e is founder of Developer Learning Solutions, specializing in hands-on technology training. His name regularly appears in publications like DevX.com, MobiForge.com, and \u003ci\u003eCODE Magazine\u003c\/i\u003e. He is also the author of \u003ci\u003eSwiftUI For Dummies, Beginning Swift Programming, Python Machine Learning,\u003c\/i\u003e and \u003ci\u003eLearning WatchKit Programming\u003c\/i\u003e.\u003c\/p\u003e  \u003cp\u003e\u003cb\u003eGet going with one of today’s top languages!\u003c\/b\u003e\u003c\/p\u003e\u003cp\u003eThis book walks with you as you take your first steps in the fast-growing coding language, Go. You’ll work through all the basics, and then you’ll build job-ready skills for making applications that work in the cloud! Go is great at scooping up data from around the web and putting it into users’ hands. With this book at your side you’ll become adept at accessing, structuring, and serving data by writing applications that are easy to maintain and understand. Go is in high demand—this primer will put it on your resume.\u003c\/p\u003e\u003cp\u003e\u003cb\u003eInside. . .\u003c\/b\u003e\u003c\/p\u003e \u003cul\u003e\u003cb\u003e\u003cli\u003eLearn the fundamentals of Go\u003c\/li\u003e\n\u003cli\u003eWrite clean, efficient functions\u003c\/li\u003e\n\u003cli\u003eStructure and organize data\u003c\/li\u003e\n\u003cli\u003eFind out all about Goroutines\u003c\/li\u003e\n\u003cli\u003eDiscover third-party Go packages\u003c\/li\u003e\n\u003cli\u003eWork with web services\u003c\/li\u003e\n\u003cli\u003eLink up with REST APIs\u003c\/li\u003e\u003c\/b\u003e\u003c\/ul\u003e","brand":"For Dummies","offers":[{"title":"Default Title","offer_id":47989301510373,"sku":"NP9781119786191","price":34.99,"currency_code":"USD","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/1842\/7735\/files\/9781119786191.jpg?v=1761783581","url":"https:\/\/k12savings.com\/es\/products\/go-programming-language-for-dummies-isbn-9781119786191","provider":"K12savings","version":"1.0","type":"link"}