From the course: Learning the Go Standard Library

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Print and Println basics

Print and Println basics - Go Tutorial

From the course: Learning the Go Standard Library

Start my 1-month free trial

Print and Println basics

- [Instructor] All right. So let's start by looking at the print and print line statements. So here in my VS Code editor, I'm going to open my exercise files folder, which are or on the desktop. All right. And then here in chapter one, in the start folder, I'll open up the print folder and we'll start with print_start. All right. So the print and print line functions are used to write the values of a set of given arguments to standard output. And they both return the number of bytes written out and any error that was encountered. But in practice, you probably won't see those return values used very often. So let's start with the print statement. And to do that, I'm going to write fmt.Print. And I'll write, "Welcome to Go". And when I save, you can see that I'm using Visual Studio Code with the Go extensions installed. So it automatically imported the FMT module for me. If you're not using Visual Studio Code,…

Contents