Introduction to the Go Programming Language
Published by O'Reilly Media, Inc.
Why Go is Great and How to Use it
Are you tired of working on software projects that have gotten too complex? Tired of sitting around waiting for your code to compile? Tired of trying to shoehorn the functionality you need into a class inheritance structure?
Go represents a return to the basics of software development. Programs compile in seconds, not minutes. If a developer on your team makes a mistake, like failing to use a variable or handle an error, Go will point it out immediately, before they share the code with others. And features of other languages that tend to lead to bugs and bad design, such as class inheritance or threads, have been replaced with less error-prone concepts. Switch your project to Go, and reap the productivity benefits!
What you’ll learn and how you can apply it
By the end of this live online course, you’ll understand:
- Go's strengths as a programming language
- Types of projects Go is most suited for
- What steps to take to continue learning Go
And you’ll be able to:
- Write, build, and distribute simple command-line programs in Go
- Organize code into reusable packages
- Read Go package/function documentation
This live event is for you because...
- You are a developer with existing programming experience, and you need a quick overview of Go's unique features.
- You are a lead developer, and need to evaluate Go as a potential language for your next project.
Prerequisites
- Experience using another programing language (e.g., Ruby, Java, Python)
- Experience compiling and running code in another language
Materials or downloads required in advance:
- Work through welcome and basics sections of A Tour of Go.
- Course material will be provided via The Go Playground, so no local installation of Go is necessary.
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Go syntax
- Presentation: Go file layout: package, imports, code
- Presentation: Compiling/running code
- Presentation: Functions
- Presentation: Packages
- Presentation: Variables and Types
- Exercise: Go syntax
- Q&A
Declaring Functions
- Presentation: Declaring Functions
- Presentation: Variable scope
- Presentation: Multiple return values
- Exercise: Declaring functions
- Presentation: Pass-by-value
- Presentation: Pointers
- Exercise: Passing pointers
- Q&A
- Break (5 minutes)
Declaring Packages
- Presentation: The Go workspace
- Presentation: Import paths
- Presentation: go get
- Presentation: go doc
- Exercise: Using package documentation
- Q&A
Structs
- Presentation: As underlying type for defined types
- Presentation: Embedding structs
- Exercise: Struct types
- Q&A
- Break (5 minutes)
Defined Types
- Presentation: With underlying basic types
- Presentation: Defining methods
- Presentation: Promotion of embedded types' methods
- Exercise: Defined Types
- Q&A
Interfaces Presentation: Concrete types vs. interface types Presentation: Type assertions Exercise: Interfaces Q&A
Handling Errors
- Presentation: defer
- Presentation: panic
- Presentation: recover
- Exercise: Handling Errors
- Q&A
- Break (5 minutes)
Concurrency
- Presentation: Goroutines
- Presentation: Channels
- Exercise: Goroutines and Channels
- Q&A
Where to Go Next
- Presentation: Data structures: arrays, slices, maps
- Presentation: "testing" package
- Presentation: Web development
- Presentation: Buffered channels
- Presentation: Other resources
- Q&A
Your Instructor
Jay McGavren
Jay McGavren is the author of Head First Go and Head First Ruby, both from O'Reilly. He has 15 years of software development experience, including 4 years as a software development instructor.