Check out a free preview of the full Go for JavaScript Developers course:
The "Go Documentation Practice" Lesson is part of the full, Go for JavaScript Developers course featured in this preview video. Here's what you'd learn in this lesson:

Brenna discusses the first exercise of the course, which is a practice in exploring the Go Documentation.

Get Unlimited Access Now

Transcript from the "Go Documentation Practice" Lesson

>> So the first exercise that isn't involved with installing Go, is going to be kind of explore the documentation. So I'm gonna navigate over to Exercise #1A, that markdown which is in the one setup directory, and talk to you how the exercise files are going to be structured.

[00:00:16] When you're looking at the repository, all of the directories on the left hand side there are going to be structured the same as the slide deck and kind of what we're talking about throughout the day. So the way the exercise files are structured at the top, it'll be the title of what we're trying to do for this exercise.

[00:00:31] The goals of what the exercise should accomplish. Any setup information you may need to know, and then the actual directions to the exercise itself. So for this one, we're just gonna kind of explore the documentation a little bit further, and find answers to the following questions. The first one is about reading some for loop documentation in the Effective Go document.

[00:00:49] And answering the question, what kind of for loop doesn't exist in Go? The next is to read about the font package and what does font print line return? And then third is to find a blog post about the recent release of Go 1.13, and list some of the new features that are involved with the new Go release.

[00:01:09] All right, so coming back together to talk about what we found in the documentation. When you read about for loops in the Effective Go document, what loop doesn't exist in go?
>> Do while. Yeah. And then in a thumped package, what does thumped up print line return?

>> It returns an integer and an error.
>> An integer of what?
>> Number of bytes written and any write error encountered.
>> Any write error encountered. And as we talk about errors and kind of what some of these functions return, that's something to keep in mind. So for me, if I'm thinking like console.log, if that were to return something, I would expect it to return a string.

[00:01:48] And in this case, even though we're printing to like standard output, we're not returning a string we're returning a number of bytes and an error. So kinda keep that in mind as we keep going through the workshop. And then when you're looking at the blog post, does anyone have any comments on exciting stuff coming out in 1.13/2.0?

[00:02:04] [LAUGH]
>> Checksum database.
>> Checksum database, yeah. Some cool stuff around errors.