Hello and welcome to the and programming language course in the previous session, we talked about modifying
it's nice and golden in this session, we want to talk about the others this last concept.
So think of a slice.
In go language, you are allowed to sort the L.A. present in this nice the standard library of GO languages
provides the sort haikus, which contains different types of sorting methods for sorting this noise
abuse floats, 64s and history.
These function always sorted and is available in this nice and ask ending order.
Now go to the school program to illustrate how to sew talent is present in this slice.
First, creating twist, nice variables.
For example, a slice from Carlin equals S-Corp rocket and type is a strange and initialize value,
for the example.
Can.
Jehovah.
Go.
C++.
And the movie and in the next line, create another two slices slice to call and equals the school brackets,
and Typekit is built and initialize values 30 twenty fifty nine to 10, 40, 80, 60 and 70 first displayed
as nice as before sorting.
Now do the following first print the message this p b for certain.
Go to the next line and display two variables.
Both P displays one and set the value in this nice form and go to the next line.
If they slice two
and set the value in a slice to reformat the code and save the project.
Now performing sort operation on this slice using sort function, sort the art because type of first
this slice is a string we used strings function as strings and set the variable slice one and go to
the next line sort of dots because type of second, this nice is integer.
We use its function.
Hmm.
And I said that even it's nice to save the project and go to the next line and display a slices after
sorting them first display a message FP after.
So to go to the next line and display two variables if the this nice one
and go to the next line.
If the display is nice to consider, even it's nice to perform at could save the process and execute
the program.
Now we can see the output before sorting.
We have a nice one by the values per Java, Go, C++ and Ruby and Unsorted, and it's nice to 30 2015
38 09:30 10, 48 60 70.
And it is of to two.
After sorting, we have a nice volume by value C++ code Java, Perl, Ruby and so too, and it's nice
to have the values 10, 20, 30, 40, 50, 60, 70, 80 and 90 and the values are sorted.
OK, we printed this slices and see the values are on sorted, so used from strings and Ian's function
of social package and we could solve the slices in order not to prolong the time of decision.
We will finish it and we will continue the content in the next session.
Goodbye.