Hello and welcome to the Golang programming language course.
In the previous session, we talked about if print function and in this session we want to talk about
the other half empty package concept.
If print function.
The plaintiff function in good language formats, according to a format, is specify it and rise to
a i o dance writer.
Moreover, this function is defined under the empty package, just similar to if premium.
But one difference that drives the line between the two is that if a form is according to the specified
format, that does not form according to the defined format.
If print, if then writes the format of the pedestrian into defined using here, you'll need to import
this empty package in order to use this function.
Now you can see the syntax parameters.
This function accepts three parameters which are illustrated below.
First, W type is by the writer.
This is the specifying the standard input or output format string.
This is containing some strings, including verbs and a T-Dog interface.
This is the specified constant variables used in the code and return value.
It retains the number of by 310 and any rider or encountered.
Now let's go to this school curriculum to illustrate the usage of f print f function.
First, define some variables like that, no one, no.
Two and No.
Three and initialize then by values five, 10 and 15.
Now calling if print a function which returns no as the nominal by 310 and error or as any error encountered.
So differential barrier to like number and you are calling equals from this empty package.
The involved f print function.
Said Barry, the first started out as I all writer from the this package, we select a study out.
And select variables for the exam per person, the plus person equals personality.
Got back his list and said that it is for peace, commerce and characters.
No one, No.
Two and No.
Three.
Now printing the number of by 310 empty dot print and No.
Why it's
leading the pack is air.
And printing, if any, raw encountered F.A. thoughts, prints.
E. R. Kelly, formerly called Save the Project and Execute the program.
Now we can see the output five plus 10 equals 15 and 13 bytes written and no roll.
First, we create a variable and using the printing function to form is according to a format specified.
Then we assign the return value inside to variants like number and error.
And finally, we print the number of bytes written as no variable.
And if there is an error, we will display it as a roll variable in order not to prolong the time of
decision.
We will finish sheet and we will continue the content in the next session.
Goodbye.