- Introducing Go
- Installing Go
- Setting Up Your Environment
- Writing Your First Go Program: Hello World
- What Is a Data Type?
- Differentiating Between Static and Dynamic Typing
- Implementing Booleans
- Understanding Numeric Types
- Checking the Type of a Variable
- Converting Between Types
- What Is a Variable?
- Declaring Shorthand Variables
- Understanding Variables and Zero Values
- Writing a Short Variable Declaration
- Styles of Variable Declaration
- What Is a Function?
- Defining Variadic Functions
- Using Named Return Values
- Using Recursive Functions
- Passing Functions as Values
- Using the if Statement
- Using the else Statement
- Using the else if Statement
- Using Comparison Operators
- Using Arithmetic Operators
- Using Logical Operators
- Using the switch Statement
- Looping with the for Statement
- Using the defer Statement
- Working with Arrays
- Working with Slices
- Working with Maps
- What Is a Struct
- Initializing a Struct
- Nesting Structs
- Creating Default Values for Structs
- Comparing Structs
- Understanding Public and Private Values
- Differentiating Between Point and Value References
- Using Methods
- Creating Method Sets
- Working with Methods and Pointers
- Using Interfaces
- Creating String Literals
- Understanding Rune Literals
- Concatenating Strings
- Handling Errors and Idiomatic Go
- Understanding the Error Type
- Creating Errors
- Formatting Errors
- Returning an Error from a Function
- Errors and Usability
- Don't panic
- Understanding Concurrency
- Concurrency Versus Parallelism
- Understanding Concurrency Through a Web Browser
- Blocking and Non-Blocking Code
- Handling Concurrent Operations with Goroutines
- Using Goroutines to Manage Latency
- Defining Goroutines
- Using Channels
- Using Buffered Channels
- Blocking and Flow Control
- Using Channels as Function Arguments
- Employing the select Statement
- Quitting Channels
- Importing Packages
- Understanding Package Usage
- Using Third-Party Packages
- Installing a Third-Party Package
- Managing Third-Party Dependencies
- Formatting Code in Go
- Using gofmt
- Configuring Text Editors
- Naming Conventions
- Using golint
- Using godoc
- Automating Workflow
- Testing: The Most Important Aspect of Software Development
- testing Package
- Running Table Tests
- Benchmarking in Go
- Providing Test Coverage
- Logging
- Printing Data
- Using the fmt Package
- Using Delve
- Using gdb
- Operating with Inputs and Outputs
- Accessing Raw Command-Line Arguments
- Parsing Command-Line Flags
- Working with Types
- Customizing Help Text
- Creating Subcommands
- POSIX Compliance
- Installing and Sharing Command-Line Programs
- Announcing Your Presence with the "Hello World" Web Server
- Examing Requests and Responses
- Working with Handler Functions
- Handling 404s
- Setting a Header
- Responding to Different Types of Requests
- Receiving Data from GET and POST Requests
- Understanding HTTP
- Making a GET Request
- Making a POST Request
- Gaining Further Control over HTTP Requests
- Debugging HTTP Requests
- Dealing With Timeouts
- Introducing JSON
- Using JSON APIs
- Using JSON with Go
- Decoding JSON
- Mapping Data Types
- Working with JSON Received over HTTP
- The Importance of Files
- Reading and Writing Files with the ioutil Package
- Writing to a File
- Listing a Directory
- Copying a File
- Deleting Files
- Using Files to Manage Configuration
- Defining Regular Expressions
- Getting Familiar with Regular Expression Syntax
- How To Validate Data Using Regular Expressions
- Using Regular Expressions for Validation
- Using Regular Expressions to Transform Data
- Parsing Data with Regular Expressions
- Programming the Element of Time
- Putting Your Program to Sleep
- Setting a Timeout
- Using a Ticker
- Representing Time in a String format
- Working with Time structs
- Adding and Subtracting Time
- Comparing Different Time Structs
- Understanding targets
- Reducing the Size of Binaries
- Using Docker
- Downling Binary Files
- Using go get
- Releasing Code with Package Managers
- Managing Dependencies with dep
- Creating a HTTP Server with httprouter
- Scaffolding a REST API
- Testing HTTP Routes
- Serving JSON
- Adding Data Persistence
- What is TCP?
- Using telnet
- Using the net Package
- Creating a Simple Chat Server
- Managing Client Connections
- Enabling Messaging Between Clients
- Preventing Echoes