Go Programming
Overview
This class provides students with a foundational study of the Go programming language. Classroom lectures stress the strengths of Go, which provide programmers with the means of writing scalable, maintainable, and concurrent code. Lab exercises throughout the class test and reinforce understanding of the concepts.
Cumulative graded assessments available for group training.
Duration
40 hours
Who Should Take This Course
Audience
This class is intended for developers with programming language experience. This class is not designed for students who are completely new to programming; it is targeted at developers with proficiency in at least one other language (C, Python, Java, etc.).
Prerequisites
Students should have completed our Python Programming class or have equivalent experience with a programming language.
Why You Should Take This Course
Upon completion of this class, students will be able to accomplish the following in Go:
- Build and run Go programs
- Use correct Go syntax and style in Go programs
- Create and call functions
- Define and manipulate custom types
- Author, run, and maintain unit tests and benchmarks
- Debug the behavior of a running program
- Build packages, modules, and repositories
- Template generic functions to avoid repetition
- Write concurrent programs using goroutines
- Perform I/O on files, network sockets, and other data sources
- Customize a simple webserver
- Integrate with third-party libraries in other compiled languages
Course Outline
Go Programming
-
Go Fundamentals
-
- Syntax
- Predeclared Types
- Control Flow
- Pointers
- Using Packages
-
Composite Types and Interfaces
-
- Type Declarations
- Arrays and Maps
- Slices
- Channels
- Structs
- Methods
- Interfaces
-
Testing, Debugging, and Profiling
-
- Unit Testing with testing
- Fuzz Testing
- Benchmarking
- Debugging with Delve
-
Building, Packaging, and Distribution
-
- System Layout
- Modules and go.mod
- Project Layout
- Dependencies and Versioning
- Publishing
- Build Constraints/Tags
-
Generics
-
- Constraints
- Instantiation
-
Goroutines and Concurrency
-
- Goroutines
- Concurrent-Safe Channels
- Synchronization Primitives
- Data Races
- Context Interface
-
System Interaction
-
- System Calls
- unsafe Package
-
Network Programming in Go
-
- DNS and Name Resolution
- Dialing Out
- Listening, Streaming Style
- Listening, Datagram Style
- net/http Package
-
Library Integration
-
- Importing the C Package
- Strings