1 00:00:13,770 --> 00:00:17,640 Hello and welcome to the Golang programming language course. 2 00:00:17,910 --> 00:00:22,850 In the previous session, we talked about time, assertions and indecision. 3 00:00:22,890 --> 00:00:26,010 We want to talk about the other interface concept. 4 00:00:30,010 --> 00:00:31,060 Type suits. 5 00:00:33,780 --> 00:00:41,690 In going Ingo Face plant sewage is used to compare the concrete type of an interface with the multiple 6 00:00:41,690 --> 00:00:44,480 times pool wise in the case of statements. 7 00:00:45,350 --> 00:00:53,030 It is similar to time assertions with only one difference i.e. Chase is testifying at times, not the 8 00:00:53,030 --> 00:00:53,540 values. 9 00:00:53,810 --> 00:00:57,470 You can also compare it tied to the interface type. 10 00:00:58,430 --> 00:01:03,410 Let's go to this school program to illustrate how to use pipes which. 11 00:01:05,780 --> 00:01:14,890 First, define a function that accept an argument as an entire face, for the example, following this 12 00:01:14,960 --> 00:01:21,720 play, this a variable like a as any a face. 13 00:01:28,010 --> 00:01:34,430 Now define Switch keyboard and a tie for using time switch. 14 00:01:35,540 --> 00:01:36,530 Switch 15 00:01:39,050 --> 00:01:39,540 A. 16 00:01:40,190 --> 00:01:45,400 Don't open and close branches this time. 17 00:01:51,540 --> 00:02:05,970 Now set different cases for type of a variable, for the example case in Cologne and set a statement 18 00:02:05,970 --> 00:02:14,280 for this case, for example, display type and value of a very that if air time 19 00:02:17,280 --> 00:02:31,500 person to operate case dash, dash and value color person, the legislation and and set forth time a 20 00:02:31,650 --> 00:02:38,190 and set for the value a dot or an enclosed prances is and set into value. 21 00:02:39,660 --> 00:02:40,980 Save the project. 22 00:02:42,360 --> 00:02:45,240 Now do these for a few other data types. 23 00:02:45,510 --> 00:02:48,720 For the example that Chase S1 24 00:02:51,540 --> 00:03:05,460 Cologne said the message copied this line and paste for S3 and sets the time for a to just ring 25 00:03:08,100 --> 00:03:10,020 and said another case. 26 00:03:10,680 --> 00:03:26,160 Case load 64 color and again paste the message and set time for a two float and sixty four and define 27 00:03:26,400 --> 00:03:28,170 default for the case. 28 00:03:28,380 --> 00:03:31,070 Then none of the data types are available. 29 00:03:33,780 --> 00:03:43,560 Different color and set a message type not. 30 00:03:47,810 --> 00:03:54,730 Now go to main function and involve the display function and send different values of different data 31 00:03:54,740 --> 00:04:02,540 times to the missile, as our units say, if the project go to main launcher called display function 32 00:04:02,540 --> 00:04:10,700 and set an integer value as arguing and first display, a hundred and twenty three go to the next line. 33 00:04:10,940 --> 00:04:22,970 And the other case that the string value as argument display sit and let you go through training language, 34 00:04:23,150 --> 00:04:24,530 go to the next line. 35 00:04:24,770 --> 00:04:36,800 And the other case that the floats 64 value as argument display a hundred point fifty five and go to 36 00:04:36,800 --> 00:04:37,670 the next line. 37 00:04:37,670 --> 00:04:46,460 And the other case that the bool value as argument display set true value, reformat the code and save 38 00:04:46,460 --> 00:04:48,560 the project, then execute the program. 39 00:04:51,590 --> 00:04:58,880 Now we can see the output time and value one hundred and twenty three time history, value go programming, 40 00:04:58,880 --> 00:05:07,370 language and time floats 64 in value is one hundred point fifty five for the fourth case means bullion. 41 00:05:07,490 --> 00:05:14,810 When we call the display unit to missing the value of Boolean to the of the an argument since no case 42 00:05:14,810 --> 00:05:16,970 is performed for the Boolean data time. 43 00:05:17,180 --> 00:05:22,670 So the default case is call and see type, not found message. 44 00:05:24,380 --> 00:05:30,050 In order not to prolong the time of decision, we will finish it and we will continue the content in 45 00:05:30,050 --> 00:05:31,070 the next session. 46 00:05:31,280 --> 00:05:31,790 Goodbye.