This lesson is locked. Login or Subscribe for more access!

Improve number readability

Duration: 1 mins

Short lesson on how to make Go code more readable.

Instructor

Matt Boyle

Share with a friend!

Transcript

Here's a really simple but useful tip for you. Let's say you have a big number like this.

Some of you may be able to read that really easily, but it's kind of hard to figure out exactly what that number is. So one thing that Go supports, which is a really nice readability improvement, is that you can actually write the same number this way.

As you can see, that's much more readable—it's much clearer, and you can use it in exactly the same way.