1 00:00:13,750 --> 00:00:19,810 Hello and welcome to the Golang programming language course in the previous session, we talked about 2 00:00:19,810 --> 00:00:22,340 creating instances of historic times. 3 00:00:22,690 --> 00:00:26,730 And in this session, we want to talk about the other instructions. 4 00:00:31,920 --> 00:00:41,070 Mr Airstrike type, a structure which is the field of another structure is known as nested structure. 5 00:00:42,030 --> 00:00:49,530 A stroke can be nested by creating a stroke type, using other times as the time for the field of a 6 00:00:49,530 --> 00:00:56,700 struct listing given a stroke within another can be useful way to model more complex structures. 7 00:00:57,360 --> 00:01:01,290 Now you can see the syntax for nest at the stroke type. 8 00:01:03,180 --> 00:01:08,490 Now go to this good program to illustrate how to create the nested structure. 9 00:01:11,040 --> 00:01:13,100 First, create a stroke name. 10 00:01:13,140 --> 00:01:15,460 Also tie 11 00:01:18,680 --> 00:01:19,070 hoser. 12 00:01:21,690 --> 00:01:22,380 That's right. 13 00:01:23,950 --> 00:01:29,200 Good practice and set the variable name Estrange 14 00:01:32,050 --> 00:01:33,640 and branch. 15 00:01:37,050 --> 00:01:37,710 This strange. 16 00:01:40,940 --> 00:01:44,330 And year it. 17 00:01:47,140 --> 00:01:51,260 And said a common for export, these distract. 18 00:01:52,750 --> 00:02:01,570 Oh, sir, distract, because first letter of all a is often the case. 19 00:02:01,570 --> 00:02:06,970 So the author of Strike is unexpected, so you must use a comment about this structure. 20 00:02:07,930 --> 00:02:09,200 Now, create another. 21 00:02:09,220 --> 00:02:13,720 It's not like it's art that contains a field as opposed to a structured 22 00:02:17,410 --> 00:02:18,010 time. 23 00:02:19,360 --> 00:02:24,790 It's all this right kid brackets. 24 00:02:26,600 --> 00:02:35,300 In this case, we define an also a that even for the example, we set name of this even as details details 25 00:02:37,580 --> 00:02:42,470 also set the comment for export this right? 26 00:02:44,120 --> 00:02:46,750 It's a story. 27 00:02:48,180 --> 00:02:50,460 Reformat the code and save the project. 28 00:02:50,700 --> 00:02:58,770 Now we could define two astronauts, first author and second, it's on now go to main function and create 29 00:02:58,770 --> 00:03:09,810 an instance of each art instructor, create a variable drawing results from its Art Result column because 30 00:03:10,290 --> 00:03:17,920 it's R. Kelly brackets and initialize its parameters details that it points to also a restaurant. 31 00:03:18,120 --> 00:03:22,440 So we create an instance from Oh sorry, and initialize it. 32 00:03:24,930 --> 00:03:41,010 D turns full circle and assign the values like Julia and four branch e c E. and Year is 2020. 33 00:03:41,400 --> 00:03:51,780 Reformat the code and go to the next line and display the values, the T the turns. 34 00:03:54,930 --> 00:03:56,480 Oh, sir. 35 00:03:57,240 --> 00:04:07,050 Go to the next line, and that's the result reform of the code, said the prosaic, and execute the 36 00:04:07,050 --> 00:04:12,150 program, now we can see the output. 37 00:04:12,660 --> 00:04:19,770 In this example, we were able to create two different structures and use them nested in each other 38 00:04:19,770 --> 00:04:26,280 and display the values of its validators in order not to prolong the time a decision will finish it, 39 00:04:26,280 --> 00:04:29,370 and we will continue the content in the next session. 40 00:04:29,700 --> 00:04:30,210 Goodbye.