This material is designed to be used as a 2 to 3 day class to go over various mechanisms within the language as well as 3rd party packages that are useful in some of our practical application labs.
In the interest of time, there are some basic topics that are not covered in this course and are assumed knowledge prior to taking this class. A good primer would be to review these resources:
You can also find a large list of books available and the list is maintained by the Golang team. This site should have the most up-to-date information on learning resources:
This course info will assume that you have already gone through the tasks to get a Go environment setup locally on your computer.
Follow the setup instructions HERE to setup your environment.
Some key definitions about the language that may be different from your current language of choice
-
Golang uses a static type system
- Static typing allows more opportunities for compiler optimizations
- Finding type-mismatching at compile time causes less code errors
- Other languages do this already (.NET, C, Java), however:
- Go's implementation of polymorphism allows for static typing to feel dynamic by matching interface signatures
-
Golang focuses on concurrency
- One of the challenges that Go set out to solve is scalability of large applications. Golang can scale at large using its built-in concurrency design.
- Often in other languages, an effective concurrency model usually comes at the cost of ease-of-use. Go is able to achieve efficient concurrency and it's actually pretty easy to implement.
-
Ease of Use
- Believe it or not, most of the fundamentals in Go can be taught over a few hours in a classroom setting. There is continued development around best practices and code organization/optimization that will need to come with this as well, but the core language is fairly simple.
-
Compiling and Distribution
- Go compiles to a single native binary (as opposed to an interpreter/VM), which makes deploying an application written in Go as easy as copying the application file to the destination.
This section contains all of the topics covered in this course. The topics are arranged in an order that I think is the most comprehensive from a learning perspective in class, however, everyone learns differently, and you are more than welcome to step through these topics in any order that works for you.
- Variables/Structs (Practice / Answer)
- Slices (Practice / Answer)
- Maps (Practice / Answer)
- Functions (Practice / Answer)
- Pointers (Practice / Answer)
- Methods (Practice / Answer)
- Packaging (Pkg Example / Mod Practice)
- Routines (Practice / Answer)
- Channels
- Examples: (UnBuffered / Buffered / Real-World)
Join the Slack community of Gophers by registering here:
- Fill out your name and email address HERE
- Check your email, and follow the link to the slack application.