1 option
Go programming language for dummies / Wei-Meng Lee.
- Format:
- Book
- Author/Creator:
- Lee, Wei-Meng, author.
- Language:
- English
- Subjects (All):
- Go (Computer program language).
- Physical Description:
- 1 online resource (339 pages) : illustrations
- Place of Publication:
- Indianapolis, Indiana : John Wiley and Sons, [2021]
- Summary:
- Ready, set, program with Go! Now is the perfect time to learntheGoProgramming Language. It's one of the most in-demand languages among tech recruitersand developers love its simplicity and power. Go Programming LanguageForDummies is an easy way to add this top job skill to your toolkit.Writtenfor novice and experienced coders alike, this booktraversesbasic syntax, writing functions, organizing data, building packages, and interfacing with APIs. Go-orGoLang, 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 youon the path to using the language that's created some oftoday's leading webapplications, so you can steer your career where you want to Go! * Learn how Go works and start writing programs and modules * Install and implement the most powerful third-party Go packages * Use Go in conjunction with web services and MySQL databases * Keep your codebase organized and use Go to structure data With this book, you canjoin the growing numbers of developers using Go to create 21st century solutions. Step inside to take start writing code that putsdatain users'hands.
- Contents:
- Intro
- Title Page
- Copyright Page
- Table of Contents
- Introduction
- About This Book
- Foolish Assumptions
- Icons Used in This Book
- Beyond the Book
- Where to Go from Here
- Part 1 Getting Started with Go
- Chapter 1 Hello, Go!
- Seeing What Learning Go Can Do for You
- Installing Go on Your Machine
- macOS
- Windows
- Using an Integrated Development Environment with Go
- Writing Your First Go Program
- Compiling and running the program
- Understanding how a Go program works
- Making sense of the Go file structure
- Compiling for multiple operating systems
- Comparing Go with Other Languages
- Syntax
- Compilation
- Concurrency
- Library support
- Chapter 2 Working with Different Data Types
- Declaring Always-Changing Variables
- Using the var keyword: Type-inferred variables
- Specifying the data type: Explicitly typed variables
- Using the short variable declaration operator
- Declaring Never-Changing Constants
- Removing Unused Variables
- Dealing with Strings
- Performing Type Conversions
- Discovering the type of a variable
- Converting a variable's type
- Interpolating strings
- Chapter 3 Making Decisions
- Using If/Else Statements to Make Decisions
- Laying the foundation for the if/else statement: Logical and comparison operators
- Using the if/else statement
- Short-circuiting: Evaluating conditions in Go
- When You Have Too Many Conditions: Using the Switch Statement
- Switching with fall-throughs
- Matching multiple cases
- Switching without condition
- Chapter 4 Over and Over and Over: Using Loops
- Performing Loops Using the for Statement
- Iterating over a Range of Values
- Iterating through arrays/slices
- Iterating through a string
- Using Labels with the for Loop
- Chapter 5 Grouping Code into Functions
- Defining a Function
- Defining functions with parameters.
- Defining functions with multiple parameters
- Passing arguments by value and by pointer
- Returning values from functions
- Naming return values
- Working with variadic functions
- Using Anonymous Functions
- Declaring an anonymous function
- Implementing closure using anonymous functions
- Implementing the filter() function using closure
- Part 2 Working with Data Structures
- Chapter 6 Slicing and Dicing Using Arrays and Slices
- Arming Yourself to Use Arrays
- Declaring an array
- Initializing an array
- Working with multidimensional arrays
- Sleuthing Out the Secrets of Slices
- Creating an empty slice
- Creating and initializing a slice
- Appending to a slice
- Slicing and Ranging
- Extracting part of an array or slice
- Iterating through a slice
- Making copies of an array or slice
- Inserting an item into a slice
- Removing an item from a slice
- Chapter 7 Defining the Blueprints of Your Data Using Structs
- Defining Structs for a Collection of Items
- Creating a Go Struct
- Making a Copy of a Struct
- Defining Methods in Structs
- Comparing Structs
- Chapter 8 Establishing Relationships Using Maps
- Creating Maps in Go
- Initializing a map with a map literal
- Checking the existence of a key
- Deleting a key
- Getting the number of items in a map
- Iterating over a map
- Getting all the keys in a map
- Setting the iteration order in a map
- Sorting the items in a map by values
- Using Structs and Maps in Go
- Creating a map of structs
- Sorting a map of structs
- Chapter 9 Encoding and Decoding Data Using JSON
- Getting Acquainted with JSON
- Object
- String
- Boolean
- Number
- Array
- null
- Decoding JSON
- Decoding JSON to a struct
- Decoding JSON to arrays
- Decoding embedded objects
- Mapping custom attribute names
- Mapping unstructured data
- Encoding JSON.
- Encoding structs to JSON
- Encoding interfaces to JSON
- Chapter 10 Defining Method Signatures Using Interfaces
- Working with Interfaces in Go
- Defining an interface
- Implementing an interface
- Looking at How You May Use Interfaces
- Adding methods to a type that doesn't satisfy an interface
- Using the Stringer interface
- Implementing multiple interfaces
- Using an empty interface
- Determining whether a value implements a specific interface
- Part 3 Multitasking in Go
- Chapter 11 Threading Using Goroutines
- Understanding Goroutines
- Using Goroutines with Shared Resources
- Seeing how shared resources impact goroutines
- Accessing shared resources using mutual exclusion
- Using atomic counters for modifying shared resources
- Synchronizing Goroutines
- Chapter 12 Communicating between Goroutines Using Channels
- Understanding Channels
- How channels work
- How channels are used
- Iterating through Channels
- Asynchronously Waiting on Channels
- Using Buffered Channels
- Part 4 Organizing Your Code
- Chapter 13 Using and Creating Packages in Go
- Working with Packages
- Creating shareable packages
- Organizing packages using directories
- Using Third-Party Packages
- Emojis for Go
- Go Documentation
- Chapter 14 Grouping Packages into Modules
- Creating a Module
- Testing and Building a Module
- Publishing a Module on GitHub
- Part 5 Seeing Go in Action
- Chapter 15 Consuming Web APIs Using Go
- Understanding Web APIs
- Fetching Data from Web Services in Go
- Writing a Go program to connect to a web API
- Decoding JSON data
- Refactoring the code for decoding JSON data
- Fetching from multiple web services at the same time
- Returning Goroutine's results to the main() function
- Chapter 16 Getting Ready to Serve Using REST APIs
- Building Web Services Using REST APIs
- HTTP messages.
- REST URLs
- REST methods
- REST response
- Creating a REST API in Go
- Getting your REST API up and running
- Testing the REST API
- Registering additional paths
- Passing in query string
- Specifying request methods
- Storing the course information on the REST API
- Testing the REST API again
- Chapter 17 Working with Databases
- Setting Up a MySQL Database Server
- Interfacing with the MySQL server
- Creating a database and table
- Creating a new account and granting permission
- Connecting to the MySQL Database in Go
- Retrieving a record
- Adding a record
- Modifying a record
- Deleting a record
- Part 6 The Part of Tens
- Chapter 18 Ten Useful Go Packages to Create Applications
- color
- Installation
- Code sample
- now
- go-pushbullet
- goid
- json2go
- gojq
- turtle
- go-http-client
- notify
- gosx-notifier
- Chapter 19 Ten Great Go Resources
- The Official Go Website
- Go by Example
- A Tour of Go
- The Go Frequently Asked Questions
- The Go Playground
- Go Bootcamp
- Effective Go
- Gophercises
- Tutorialspoint
- Stack Overflow
- Index
- EULA.
- Notes:
- Description based on print version record.
- ISBN:
- 1-119-78621-5
- 1-119-78620-7
- OCLC:
- 1244623396
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.