Go from the beginning
Welcome to Go from the beginning, a free book containing 25+ lessons that will take you from "zero to hero" in the amazing language Go.
Read online
Read offline/PDF/EPUB
https://leanpub.com/go-from-the-beginning FREE on LeanPub
Donate
Please consider donating to the people of Ukraine.
- Back and Alive (they are buying what the army requests and do public reports) https://comebackalive.in.ua
- NBU (National Bank of Ukraine) accounts for the army support https://t.co/MauRvgu89E
- UNICEF, https://www.unicef.org/emergencies/war-ukraine-pose-immediate-threat-children
Table of content
Chapter | Title | Section | What you will learn | Lesson |
---|---|---|---|---|
01 | Hello world | Basics | Why use Go and how to write your first program | Lesson |
02 | Using variables | Basics | How to declare variables with different data types and how to initialize and assign values | Lesson |
03 | Boolean logic with If and Else | Basics | How to work with boolean variables and create different execution paths with If, Else and Else If | Lesson |
04 | Converting between strings and numbers | Basics | How to use the strconv library to convert between primitives and strings. |
Lesson |
05 | Loop statements | Basics | How to repeat statements and iterating over list structures and ways to control the loops | Lesson |
06 | User input | Basics | How to read user input from the console | Lesson |
07 | Functions | Basics | Reuse your code by creating functions. Learn how to deal with parameters and how to deal with returns and return types | Lesson |
08 | Error handling | Basics | How manage errors in your code. This will teach both how to produce errors as well as deal with them | Lesson |
09 | Arrays | Composite data types | Here we will learn about arrays, how to construct them, access items and iterate over them | Lesson |
10 | Structs | Composite data types | Structs enables us to collect many fields in one grouping, learn how to create and modify structs | Lesson |
11 | Maps | Composite data types | Maps make it easy to lookup items if you know the key. Maps have the notion of keys and values. | Lesson |
12 | Interfaces | Composite data types | Learn how you can model your data as interfaces and how to implement them | Lesson |
13 | Create your first project | Projects | Learn how to create your first project | Lesson |
14 | Consume external packages | Projects | Learn how to use external packages | Lesson |
15 | Create shared module | Projects | Create a module you can share with others | Lesson |
16 | Testing | Testing | Learn to test your code | Lesson |
17 | JSON | Web Dev | Learn to work with the JSON format | Lesson |
18 | Build a Web App | Web Dev | Learn how to build a web app capable of serving many different formats | Lesson |
19 | Logs | Miscellaneous | Use logging for better management of all kinds of messages in your app | Lesson |
20 | Strings | Miscellaneous | Work with the string library | Lesson |
21 | Regex | Miscellaneous | Work with regular epressions | Lesson |
22 | Goroutines | Miscellaneous | Work with goroutines and channels | Lesson |
23 | Database with Sqlite | Miscellaneous | Work with databases | Lesson |
24 | Read and write to files | IO | Learn to read from and write to files | Lesson |
25 | Files and directories | IO | Learn to perform operations on files and directories | Lesson |
How to use this content
Every chapter consist of a lesson and an exercise. You are encouraged to run the code in the exercise, modify it and understand how it works.
Contributions
Contributions are very welcome. Please raise an issue of you see something or a PR.
I welcome contributions on:
- Suggestions on topics to cover
- Correctness issues
- Spelling
- Suggestions on better formatting
- I hope I hear from you. :)