Hello and welcome to the Golang programming language course in the previous session, we talked about
missed that a start time and indecision.
We want to talk about the others a strong concept.
At metal twists, rock type, gold language support methods, gold metals are similar to go function
with one difference.
The missile contains a receiver argument in it with the help of the receiver argument.
The missile can access the properties off the receiver.
Here you are allowed to define the method whose receiver is off a strong tight.
This receiver is accessible inside the missile.
Now you can see the scene techs.
Let's go to this school program to illustrate how to create a receiver and a sort.
Watch it first, create the restaurant name author.
Time.
Also, the strike clearly raises and different fields for the restaurant like name, a strong
branch.
A string and salary, it
now create a method with a receiver of ozer type first four-inch keyboard.
Is
now set to extract valuable as receiver, for the example.
They also
then name a function show.
The practices we can set parameters and out of it, we can define a time.
In this case, we don't have parameters and return time.
Now go to jail broadcasts or otherwise by the receiver, Mr. Wood and write out statements, for the
example, displayed the only variables bills for dismissal.
FP.
Who serves?
Name
a dance.
Name.
And AFP.
Branch.
Name.
Got branch and go to the next line.
FP.
Salary,
hey, thought site.
Before that, they called and say the project now, go to main function, create an old saw strike and
initialize it, then called the receiver
first, initializing the values of the old story structure, for example, resolved.
He calls also.
Full name, value key and brands
C s e and salary
twenty nine, Tom.
Now, calling this show, my thought as a receiver isn't that show, please format the called save the
project and execute the program.
Now we can see the output.
We could define this right by three fields, then create a receiver method and assign it to also extract.
And in this method, displayed the values of OLSA properties, then involved the receiver method, the
main function and see the results.
In order not to prolong the time of decision, we will finish it and we will continue the content in
the next session.
Goodbye.