Thanks for telling us more about your background. I’ve also heard from other people who are learning Go as their first or second language, and are having trouble getting from watching or reading to the point of writing their own programs.
I’ve been watching video courses, and it seems common that the instructors move through the topics very quickly. Sometimes I see code displayed on the screen for such a short time that I can’t read it. I have to back up and pause the video to understand what the instructor is saying. If I were learning Go as my first language that way, I would be lost too. So don’t worry.
I suggest you find one or two good books that are introductory. Introducing Go (O’Reilly) is a good introductory book. You can read through that and for each topic that is covered, stop reading and write some little programs that use that part of Go, until you feel you understand it well. I’ve been looking at William Kennedy’s book Go in Action (Manning), and it is a longer and more thorough coverage of Go.
Aside from those, I find it hard to make suggestions. There are many books on Go, but in my opinion, only a few are really good.
I thought I recognized your name was Brazilian, so I looked you up and it appears that you live in Rio de Janeiro (?). Assuming that is correct, I understand that it can be difficult and very expensive for you to get imported books there. (I have many Brazilian friends and know about that.)
Years ago, I wrote a book for O’Reilly, and one of the benefits I received was a lifetime subscription to their Safari service. There are thousands of books and video courses from many publishers available through it. They charge about $40 per month (so about R$160) to access it. If you can afford that, I suggest you look into it. https://www.safaribooksonline.com/home/ I’ve found it to be a really great learning resource. You can search on topics and then read or watch samples to learn which work best for you. At least, maybe it’s better than buying expensive books and waiting a month for them to be delivered, only to find it’s not a good book for you.
To get to the point where you are really good at a language, it’s a kind of bootstrapping process. I think people expect too much of themselves too soon. You need to start with simple things, and keep stepping up to writing more complex programs that do more.
So to develop more as a programmer, I have these suggestions:
Take your time to study the language in detail. This can be from reading books carefully, or watching videos again until you really understand. Write very simple programs to practice using elements of the language as you learn about them.
Use websites that are for coding practice. Here are some examples:
(Of the above, I have used only HackerRank. I know very little about the rest.)
Except for Project Euler, the sites have coding exercises. You write code, and then the correctness is checked automatically. Of the above list, I have used only HackerRank, and I thought it was fun to use.
- Think of a simple kind of program. Maybe it will be something fun or solves a problem just for you. Then write it in Go.
After you have success with little things, think of more complicated programs you can write. I’ve found that with the various languages I’ve learned well, I reach a point of comfort with the language, or you might call it mastery, after I’ve written a few thousand lines of code for a project that requires the use of most of the parts of the language. If you write a program in Go that’s about 5000 to 10,000 lines of code and makes you use many types, define your own types, and also involves the use of interfaces, go routines, and channels, I think you will see what I mean. After that, you will feel comfortable with the language, and you will be confident with it.