Introducing Go: Build Reliable, Scalable Programs

Introducing Go: Build Reliable, Scalable Programs

by Caleb Doxsey
Introducing Go: Build Reliable, Scalable Programs

Introducing Go: Build Reliable, Scalable Programs

by Caleb Doxsey

Paperback

$24.99 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Related collections and offers


Overview

Perfect for beginners familiar with programming basics, this hands-on guide provides an easy introduction to Go, the general-purpose programming language from Google. Author Caleb Doxsey covers the language's core features with step-by-step instructions and exercises in each chapter to help you practice what you learn.

Go is a general-purpose programming language with a clean syntax and advanced features, including concurrency. This book provides the one-on-one support you need to get started with the language, with short, easily digestible chapters that build on one another. By the time you finish this book, not only will you be able to write real Go programs, you'll be ready to tackle advanced techniques.

  • Jump into Go basics, including data types, variables, and control structures
  • Learn complex types, such as slices, functions, structs, and interfaces
  • Explore Go's core library and learn how to create your own package
  • Write tests for your code by using the language's go test program
  • Learn how to run programs concurrently with goroutines and channels
  • Get suggestions to help you master the craft of programming

Product Details

ISBN-13: 9781491941959
Publisher: O'Reilly Media, Incorporated
Publication date: 02/01/2016
Pages: 122
Sales rank: 952,396
Product dimensions: 6.90(w) x 9.00(h) x 0.40(d)

About the Author

Caleb Doxsey is a developer in New York City who enjoys helping new programmers learn Go. He works as a Software Engineer at DataDog building monitoring software for the cloud.

Table of Contents

Introduction vii

1 Getting Started 1

Machine Setup 1

Text Editors 2

The Terminal 2

Environment 2

Go 3

Your First Program 4

How to Read a Go Program 5

Exercises 8

2 Types 9

Numbers 10

Integers 10

Floating-Point Numbers 10

Example 11

Strings 12

Booleans 13

Exercises 15

3 Variables 17

How to Name a Variable 20

Scope 20

Constants 21

Defining Multiple Variables 22

An Example Program 22

Exercises 23

4 Control Structures 25

The for Statement 26

The if Statement 27

The switch Statement 29

Exercises 31

5 Arrays, Slice, and Maps 33

Arrays 33

Slices 36

Append 37

Copy 37

Maps 38

Exercises 42

6 Functions 43

Your Second Function 43

Variadic Functions 47

Closure 47

Recursion 48

Defer, panic, and recover 49

Panic and recover 50

Pointers 51

The * and & operators 51

New 52

Exercises 53

7 Structs and Interfaces 55

Structs 56

Initialization 56

Fields 56

Methods 57

Embedded Types 58

Interfaces 59

Exercises 62

8 Packages 63

The Core Packages 63

Strings 64

Input/Output 67

Files and Folders 68

Errors 70

Containers and Sort 70

Hashes and Cryptography 73

Servers 75

TCP 75

HTTP 77

RPC 78

Parsing Command-Line Arguments 79

Creating Packages 79

Documentation 81

Exercises 82

9 Testing 83

Exercises 86

10 Concurrency 87

Goroutines 87

Channels 89

Channel Direction 91

Select 91

Buffered Channels 92

An Example 93

Exercises 96

11 Next Steps 97

Study the Masters 97

Make Something 98

Team Up 98

A Answers 99

Index 109

From the B&N Reads Blog

Customer Reviews