title
Go Programming Language Tutorial | Golang Tutorial For Beginners | Go Language Training | Edureka
description
( ** Edureka Certification Training: https://www.edureka.co/ ** )
This Edureka Tutorial video on "Golang Tutorial" will help you in understanding the various fundamentals of Go programming language with examples in detail.
Subscribe to our Edureka YouTube channel and hit the bell icon to get video updates: https://goo.gl/6ohpTV
#golang #golangtutorial #golangwebdevelopment
--------------------------------------------------------------------------------------------------------
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
-------------------------------------------------------------------------------------------------------
Got a question on the topic? Please share it in the comment section below and our experts will answer it for you.
For more information, please write back to us at sales@edureka.co or call us at IND: 9606058406 / US: 18338555775 (toll free).
detail
{'title': 'Go Programming Language Tutorial | Golang Tutorial For Beginners | Go Language Training | Edureka', 'heatmap': [{'end': 947.574, 'start': 901.776, 'weight': 0.752}, {'end': 2103.033, 'start': 2014.525, 'weight': 0.919}, {'end': 2961.393, 'start': 2915.06, 'weight': 0.922}, {'end': 3627.339, 'start': 3535.583, 'weight': 1}], 'summary': 'The tutorial covers golang basics, including variables, loops, decision making, arrays, functions, recursion, control structures, structures, interfaces, file handling, and web server implementation in golang, with practical examples and demonstrations, showcasing efficiency and ease of use.', 'chapters': [{'end': 273.388, 'segs': [{'end': 57.633, 'src': 'embed', 'start': 27.118, 'weight': 0, 'content': [{'end': 31.08, 'text': 'Every language serves a special purpose and the very same goes for Golang.', 'start': 27.118, 'duration': 3.962}, {'end': 38.122, 'text': 'So why exactly should someone learn Golang? Well Golang was built by Google to solve problems.', 'start': 31.76, 'duration': 6.362}, {'end': 39.543, 'text': 'They face at Google.', 'start': 38.182, 'duration': 1.361}, {'end': 45.506, 'text': 'now, at Google, lots of big programs are built for big silver software that run on massive clusters.', 'start': 39.543, 'duration': 5.963}, {'end': 51.569, 'text': 'now, before go, Google was using languages like C++ and Java to solve problems,', 'start': 45.506, 'duration': 6.063}, {'end': 57.633, 'text': "but these languages didn't really have the fluidity and ease of construction that was needed for problems of such scale.", 'start': 51.569, 'duration': 6.064}], 'summary': 'Golang was built by google to address challenges in building large-scale software, replacing previous languages like c++ and java for improved fluidity and ease of construction.', 'duration': 30.515, 'max_score': 27.118, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ27118.jpg'}, {'end': 93.561, 'src': 'embed', 'start': 68.946, 'weight': 1, 'content': [{'end': 76.371, 'text': "Basically, if you're trying to solve a problem of enormous scale or just need an efficient and scalable code, Go should be your go-to language.", 'start': 68.946, 'duration': 7.425}, {'end': 83.355, 'text': "Now, Go isn't the first to address the need for a scalable and highly efficient program for large-scale programming.", 'start': 77.091, 'duration': 6.264}, {'end': 85.537, 'text': 'So what exactly makes it stand out?', 'start': 83.976, 'duration': 1.561}, {'end': 93.561, 'text': "Well, the existing languages have been good enough until recent years, but there's been big changes in the computing environment in the last decade,", 'start': 86.169, 'duration': 7.392}], 'summary': 'Go is the go-to language for solving large-scale problems, offering efficiency and scalability in the face of recent changes in computing.', 'duration': 24.615, 'max_score': 68.946, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ68946.jpg'}, {'end': 149.984, 'src': 'embed', 'start': 123.197, 'weight': 4, 'content': [{'end': 130.88, 'text': "You also don't want to waste resources by having an inefficient interpreter or some of the problems that generally come up with virtual machine implementations.", 'start': 123.197, 'duration': 7.683}, {'end': 137.143, 'text': 'Golang ticks all these boxes and hence has garnered the much-deserved fame in the developers community.', 'start': 131.661, 'duration': 5.482}, {'end': 139.084, 'text': 'Okay, so that was all about Go.', 'start': 137.763, 'duration': 1.321}, {'end': 141.865, 'text': "It's time we move forward and dive into programming.", 'start': 139.824, 'duration': 2.041}, {'end': 143.819, 'text': 'Now, throughout this tutorial,', 'start': 142.418, 'duration': 1.401}, {'end': 149.984, 'text': "I'll be explaining various concepts that are general to most programming languages and some concepts which are specific to go.", 'start': 143.819, 'duration': 6.165}], 'summary': 'Golang is efficient, popular in the developer community, and will be covered in this tutorial.', 'duration': 26.787, 'max_score': 123.197, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ123197.jpg'}, {'end': 203.014, 'src': 'embed', 'start': 162.853, 'weight': 5, 'content': [{'end': 167.016, 'text': 'Now before we start programming, we must also install go which is a pretty simple task.', 'start': 162.853, 'duration': 4.163}, {'end': 175.564, 'text': 'Just head over to golang.org click the download go button and install the binaries for your respective operating system.', 'start': 167.859, 'duration': 7.705}, {'end': 180.807, 'text': "Okay, So, now that we are done with the installation bit, let's head over to our first program,", 'start': 176.164, 'duration': 4.643}, {'end': 183.529, 'text': 'which is a very generic hello world program written in go.', 'start': 180.807, 'duration': 2.722}, {'end': 186.191, 'text': "I'll go with the lines of code line by line.", 'start': 184.25, 'duration': 1.941}, {'end': 192.183, 'text': 'So firstly, we have the package main, which means that every Golang program belongs to a package.', 'start': 186.917, 'duration': 5.266}, {'end': 196.227, 'text': 'This actually helps encode readability and code reusability.', 'start': 192.443, 'duration': 3.784}, {'end': 203.014, 'text': "So after we've defined the package, next we're gonna import some general libraries that are going to be used throughout the program.", 'start': 196.747, 'duration': 6.267}], 'summary': 'Install go from golang.org, then start programming a hello world program in golang.', 'duration': 40.161, 'max_score': 162.853, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ162853.jpg'}, {'end': 273.388, 'src': 'embed', 'start': 246.716, 'weight': 7, 'content': [{'end': 257.44, 'text': "It's the first function that runs, and then we have to print, hello world, this is my first Go program.", 'start': 246.716, 'duration': 10.724}, {'end': 260.482, 'text': "Let's save it, and let's run it.", 'start': 258.321, 'duration': 2.161}, {'end': 267.385, 'text': "So to run Go programs, you'll need to open up your terminal from the place you've actually saved your Go program.", 'start': 260.902, 'duration': 6.483}, {'end': 273.388, 'text': "So now that you've done that, go ahead and type Go run and the name of your program, which is first.go.", 'start': 268.346, 'duration': 5.042}], 'summary': 'Introduction to running go programs in the terminal.', 'duration': 26.672, 'max_score': 246.716, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ246716.jpg'}], 'start': 10.572, 'title': 'Golang and go programming', 'summary': "Discusses the origins and importance of golang, emphasizing its efficiency and scalability and the need for a modern language in the computing environment. it also introduces the go programming language, highlighting its efficiency and ease of installation, and provides a walkthrough of creating and running a simple 'hello world' program.", 'chapters': [{'end': 122.533, 'start': 10.572, 'title': 'Introduction to golang', 'summary': 'Discusses the origins and importance of golang, highlighting its efficiency and scalability for solving problems at enormous scale, and the need for a modern language in the computing environment, with a focus on networking and cluster computing.', 'duration': 111.961, 'highlights': ['Golang was built by Google to solve problems they faced at Google, particularly for building big software for massive clusters. Golang was created by Google to address problems faced in building big software for massive clusters.', 'Golang was designed to provide the fluidity and ease of construction needed for problems of enormous scale, which was lacking in languages like C++ and Java. Golang offers the fluidity and ease of construction required for problems of enormous scale.', "Golang stands out due to its suitability for the modern computing environment, addressing properties that existing languages don't directly cover, especially in networking, cluster computing, and efficiency for running on hundreds or thousands of machines. Golang's superiority lies in addressing properties of the modern computing environment, especially in networking, cluster computing, and efficiency for running on hundreds or thousands of machines."]}, {'end': 273.388, 'start': 123.197, 'title': 'Introduction to go programming', 'summary': "Introduces the go programming language, highlighting its efficiency and ease of installation, and provides a walkthrough of creating and running a simple 'hello world' program.", 'duration': 150.191, 'highlights': ['The Go programming language is efficient and avoids common problems associated with virtual machine implementations.', 'Golang has garnered fame in the developers community for its efficiency and resource optimization.', 'To start programming in Go, one needs to install the binaries for their respective operating system from golang.org.', "The 'hello world' program in Go involves defining the main package, importing the format package, and creating a main function to print 'hello world'.", 'The main function in Go is the first function that runs when the program is executed.']}], 'duration': 262.816, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ10572.jpg', 'highlights': ['Golang was created by Google to address problems faced in building big software for massive clusters.', 'Golang offers the fluidity and ease of construction required for problems of enormous scale.', "Golang's superiority lies in addressing properties of the modern computing environment, especially in networking, cluster computing, and efficiency for running on hundreds or thousands of machines.", 'The Go programming language is efficient and avoids common problems associated with virtual machine implementations.', 'Golang has garnered fame in the developers community for its efficiency and resource optimization.', 'To start programming in Go, one needs to install the binaries for their respective operating system from golang.org.', "The 'hello world' program in Go involves defining the main package, importing the format package, and creating a main function to print 'hello world'.", 'The main function in Go is the first function that runs when the program is executed.']}, {'end': 920.642, 'segs': [{'end': 383.588, 'src': 'embed', 'start': 335.233, 'weight': 0, 'content': [{'end': 338.075, 'text': 'except that their values cannot be modified after their definition.', 'start': 335.233, 'duration': 2.842}, {'end': 341.216, 'text': 'So that was it about variables and constants.', 'start': 339.015, 'duration': 2.201}, {'end': 344.091, 'text': "Now, let's move ahead with data types.", 'start': 342.21, 'duration': 1.881}, {'end': 350.493, 'text': "I'll show you guys how to actually define and use variables and constants later on while we are programming.", 'start': 344.571, 'duration': 5.922}, {'end': 351.353, 'text': 'So just hold on.', 'start': 350.553, 'duration': 0.8}, {'end': 358.475, 'text': 'So Golang has four different types of data types as you guys can see their numeric derived Boolean and string.', 'start': 352.053, 'duration': 6.422}, {'end': 362.297, 'text': 'So numeric data types are any data types that hold numeric value.', 'start': 358.915, 'duration': 3.382}, {'end': 366.359, 'text': 'For example, we have two types of numeric data types that is int and float.', 'start': 362.597, 'duration': 3.762}, {'end': 376.504, 'text': 'Now ints are also of two types that is ints and unsigned ints or uints and they have a space of 8, 16, 32, and 64.', 'start': 366.799, 'duration': 9.705}, {'end': 383.588, 'text': "Then there's also floating point values which have decimal precision and these can be a float 32 type or float 64 type.", 'start': 376.504, 'duration': 7.084}], 'summary': 'Golang has 4 data types: numeric, boolean, and string. numeric types include ints and floats with sizes of 8, 16, 32, and 64.', 'duration': 48.355, 'max_score': 335.233, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ335233.jpg'}, {'end': 461.588, 'src': 'embed', 'start': 427.459, 'weight': 2, 'content': [{'end': 433.24, 'text': "Okay, so let's also cover operators before we move on to a little more programming because we've already covered the data types.", 'start': 427.459, 'duration': 5.781}, {'end': 438.301, 'text': 'So Golang has three major types of operators that are prevalent in every programming language.', 'start': 433.8, 'duration': 4.501}, {'end': 442.342, 'text': 'That is arithmetic operators, relational operators, and logical operators.', 'start': 438.761, 'duration': 3.581}, {'end': 450.72, 'text': 'So arithmetic operators allow us to perform arithmetic in Go and we have this five operators, which is basically addition, subtraction,', 'start': 443.095, 'duration': 7.625}, {'end': 452.562, 'text': 'multiplication, division and modulus.', 'start': 450.72, 'duration': 1.842}, {'end': 456.844, 'text': "Modulus, if you guys don't know, gives us a remainder after division.", 'start': 453.142, 'duration': 3.702}, {'end': 461.588, 'text': 'Then we have relational operators, which is basically used for comparing two values.', 'start': 457.365, 'duration': 4.223}], 'summary': 'Golang has arithmetic, relational, and logical operators for performing operations and comparisons.', 'duration': 34.129, 'max_score': 427.459, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ427459.jpg'}, {'end': 791.39, 'src': 'embed', 'start': 755.167, 'weight': 5, 'content': [{'end': 755.907, 'text': "So let's test that out.", 'start': 755.167, 'duration': 0.74}, {'end': 764.142, 'text': "As you guys can see, it's false, true, and false, and that's how Boolean operators work and Boolean logic works.", 'start': 758.84, 'duration': 5.302}, {'end': 770.305, 'text': "Then we'd also have relational operators, but we'll get to that later when we're actually going through decision making.", 'start': 765.123, 'duration': 5.182}, {'end': 772.626, 'text': "Okay, so it's time we move ahead.", 'start': 770.886, 'duration': 1.74}, {'end': 776.208, 'text': "Okay, so now let's see how pointers actually work in Go.", 'start': 773.247, 'duration': 2.961}, {'end': 779.78, 'text': 'Now, pointers and go are easy and fun to learn.', 'start': 776.917, 'duration': 2.863}, {'end': 785.365, 'text': 'some programming tasks are performed more easily with pointers, and other tasks, such as called by reference,', 'start': 779.78, 'duration': 5.585}, {'end': 787.186, 'text': 'cannot be performed without using pointers.', 'start': 785.365, 'duration': 1.821}, {'end': 791.39, 'text': 'So it becomes necessary to learn pointers to become a perfect grow programmer.', 'start': 787.807, 'duration': 3.583}], 'summary': 'Boolean and relational operators, pointers in go for efficient programming.', 'duration': 36.223, 'max_score': 755.167, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ755167.jpg'}], 'start': 275.089, 'title': 'Golang basics and variables', 'summary': 'Covers the basics of golang programming, including variables, constants, data types, and operators. it provides specific details on numeric data types, derived data types, boolean data types, string literals, and different types of operators, along with a demonstration of variable declaration, initialization, arithmetic operations, boolean and relational operators, and a detailed explanation of pointers and their application.', 'chapters': [{'end': 479.892, 'start': 275.089, 'title': 'Golang basics: variables, constants, and data types', 'summary': 'Covers the basics of golang programming, including variables, constants, data types, and operators, with specific details on numeric data types, derived data types, boolean data types, string literals, and the different types of operators.', 'duration': 204.803, 'highlights': ['Golang has four different types of data types, including numeric, derived, Boolean, and string, with specific details on the types of numeric data and derived data types. 4 different types of data types, 2 types of numeric data types, 5 arithmetic operators', 'Numeric data types in Golang include int and float, with further details on the types of ints and floating point values. int and float data types, 8, 16, 32, 64-bit space for ints', 'Golang covers three major types of operators: arithmetic, relational, and logical, with specific examples of each type of operator and their functions. 3 major types of operators, 5 arithmetic operators, 5 relational operators, 3 logical operators']}, {'end': 920.642, 'start': 480.792, 'title': 'Go programming variables and pointers', 'summary': 'Covers the fundamentals of go programming, including variable declaration, initialization, and arithmetic operations, along with a demonstration of boolean and relational operators, concluding with a detailed explanation of pointers and their application in go programming.', 'duration': 439.85, 'highlights': ['The chapter covers the fundamentals of Go programming, including variable declaration, initialization, and arithmetic operations, along with a demonstration of boolean and relational operators, concluding with a detailed explanation of pointers and their application in Go programming.', 'A detailed explanation of variable declaration, initialization, and the use of arithmetic operators in Go programming is provided, including examples of integer and floating type variables, constants, shorthand notation, and arithmetic operations.', 'The use of boolean operators and their application in Go programming is demonstrated, along with examples of logical operations and their corresponding outputs.', 'An explanation of pointers in Go programming is presented, emphasizing their role in memory location access and the demonstration of using pointers in functions to change variable values.']}], 'duration': 645.553, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ275089.jpg', 'highlights': ['Golang has four different types of data types, including numeric, derived, Boolean, and string, with specific details on the types of numeric data and derived data types.', 'Numeric data types in Golang include int and float, with further details on the types of ints and floating point values.', 'Golang covers three major types of operators: arithmetic, relational, and logical, with specific examples of each type of operator and their functions.', 'The chapter covers the fundamentals of Go programming, including variable declaration, initialization, and arithmetic operations, along with a demonstration of boolean and relational operators, concluding with a detailed explanation of pointers and their application in Go programming.', 'A detailed explanation of variable declaration, initialization, and the use of arithmetic operators in Go programming is provided, including examples of integer and floating type variables, constants, shorthand notation, and arithmetic operations.', 'The use of boolean operators and their application in Go programming is demonstrated, along with examples of logical operations and their corresponding outputs.', 'An explanation of pointers in Go programming is presented, emphasizing their role in memory location access and the demonstration of using pointers in functions to change variable values.']}, {'end': 1285.058, 'segs': [{'end': 962.422, 'src': 'embed', 'start': 920.882, 'weight': 1, 'content': [{'end': 923.384, 'text': 'So this is where pointers are extremely helpful.', 'start': 920.882, 'duration': 2.502}, {'end': 925.526, 'text': 'You want to change something at the memory location.', 'start': 923.584, 'duration': 1.942}, {'end': 927.188, 'text': 'You basically use the pointer.', 'start': 925.806, 'duration': 1.382}, {'end': 930.17, 'text': 'Okay, so that was all about pointers.', 'start': 927.888, 'duration': 2.282}, {'end': 932.312, 'text': "Now, let's move ahead.", 'start': 930.931, 'duration': 1.381}, {'end': 938.75, 'text': 'So Golang also gives us an option to custom print using the printer function, which is in the format library.', 'start': 932.927, 'duration': 5.823}, {'end': 942.752, 'text': "Now I've demonstrated few of the implementations of the function as below.", 'start': 939.17, 'duration': 3.582}, {'end': 947.574, 'text': 'So as you guys can see we have the format printer function in this piece of code out here.', 'start': 943.212, 'duration': 4.362}, {'end': 950.256, 'text': 'So firstly the person teach F.', 'start': 947.975, 'duration': 2.281}, {'end': 953.778, 'text': "Let's ask format print a float number percentage T.", 'start': 950.256, 'duration': 3.522}, {'end': 956.259, 'text': "Let's show the type of anything.", 'start': 953.778, 'duration': 2.481}, {'end': 960.601, 'text': 'then small T with percentage shows us a boolean percentage.', 'start': 956.259, 'duration': 4.342}, {'end': 962.422, 'text': 'D is used for showing integers.', 'start': 960.601, 'duration': 1.821}], 'summary': "Using pointers to modify memory location and custom print with golang's format library.", 'duration': 41.54, 'max_score': 920.882, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ920882.jpg'}, {'end': 1075.396, 'src': 'embed', 'start': 1045.851, 'weight': 3, 'content': [{'end': 1049.774, 'text': "So let's try out all the ones that I can think of from the top of my head.", 'start': 1045.851, 'duration': 3.923}, {'end': 1054.118, 'text': 'If you all wanna go through all of them, I suppose you could go through the documentation.', 'start': 1050.114, 'duration': 4.004}, {'end': 1055.579, 'text': 'So format printf.', 'start': 1054.558, 'duration': 1.021}, {'end': 1059.905, 'text': 'So suppose we wanted to print out a float.', 'start': 1056.482, 'duration': 3.423}, {'end': 1070.812, 'text': "So we'd go %f, and we also have to specify that we need a new line, and then we'll just print out any floating point number.", 'start': 1060.645, 'duration': 10.167}, {'end': 1075.396, 'text': 'For that, we also have to kind of define it too.', 'start': 1071.133, 'duration': 4.263}], 'summary': 'Discussing usage of format printf to print float numbers in c programming.', 'duration': 29.545, 'max_score': 1045.851, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ1045851.jpg'}, {'end': 1200.631, 'src': 'embed', 'start': 1172.002, 'weight': 0, 'content': [{'end': 1176.925, 'text': "First, let's define an integer, and let's print out x.", 'start': 1172.002, 'duration': 4.923}, {'end': 1182.508, 'text': "So that's gonna be d, and this is gonna be x.", 'start': 1176.925, 'duration': 5.583}, {'end': 1183.448, 'text': 'Okay, so that worked.', 'start': 1182.508, 'duration': 0.94}, {'end': 1187.31, 'text': 'Now we can also print binaries using the printf function.', 'start': 1184.269, 'duration': 3.041}, {'end': 1191.352, 'text': 'So for binary, we go %b, new line.', 'start': 1188.011, 'duration': 3.341}, {'end': 1200.631, 'text': 'Suppose we wanted the binary of the number 25, so this would print the binary of 25.', 'start': 1192.193, 'duration': 8.438}], 'summary': 'Demonstrating printing integer and binary values using printf function.', 'duration': 28.629, 'max_score': 1172.002, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ1172002.jpg'}], 'start': 920.882, 'title': 'Formatted printing in golang', 'summary': 'Covers the usage of pointers in golang for memory manipulation, custom printing using the format library, and introduces the printf function for formatted printing, illustrating examples and outputs for various data types including booleans, integers, characters, and floating point numbers with precision.', 'chapters': [{'end': 1017.508, 'start': 920.882, 'title': 'Pointers and custom printing in golang', 'summary': 'Covers the usage of pointers in golang for memory manipulation and demonstrates custom printing using the format library, including printing float numbers, types, booleans, and integers, as well as string manipulation and concatenation.', 'duration': 96.626, 'highlights': ['Golang provides options for custom printing using the printer function in the format library, including examples of printing float numbers, types, booleans, and integers, as well as string manipulation and concatenation.', 'Pointers are used for changing values at specific memory locations in Golang.', 'Demonstrated implementations of the format printer function with examples of printing float numbers, types, booleans, and integers.', 'String manipulation and concatenation can be achieved in Golang using the plus sign to join sentences.']}, {'end': 1102.696, 'start': 1017.928, 'title': 'Introduction to printf and formatted printing', 'summary': 'Introduces the printf function for formatted printing and demonstrates the printing of strings and floating point numbers with precision, illustrating the use of %f and .3f with a specific example of constant pi as 3.1412345.', 'duration': 84.768, 'highlights': ['The chapter demonstrates the printing of strings and floating point numbers with precision using the printf function, including the specific example of constant pi as 3.1412345.', 'It explains the use of %f to print a floating point number and also illustrates specifying precision with .3F.', 'The chapter introduces the printf function for formatted printing and mentions the need to specify a new line when printing a float.']}, {'end': 1285.058, 'start': 1104.976, 'title': 'Formatted printing in go', 'summary': 'Covers formatted printing in go, including printing types, booleans, integers, binaries, characters, ascii codes, hex codes, and scientific notations using printf function, illustrating examples and outputs for each data type.', 'duration': 180.082, 'highlights': ['Printing types, booleans, integers, binaries, characters, ASCII codes, hex codes, and scientific notations using printf function The chapter covers various data types and their respective printing formats using printf function, including types, booleans, integers, binaries, characters, ASCII codes, hex codes, and scientific notations.', "Illustrating examples and outputs for each data type The examples and outputs for each data type are demonstrated, such as printing the type 'name' as string, printing boolean 'win' as true, printing the binary of 25, printing characters associated with ASCII codes, printing hex code for 15, and printing scientific notation for 'pi'."]}], 'duration': 364.176, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ920882.jpg', 'highlights': ['Printing types, booleans, integers, binaries, characters, ASCII codes, and scientific notations using printf function', 'Pointers are used for changing values at specific memory locations in Golang', 'Demonstrated implementations of the format printer function with examples of printing float numbers, types, booleans, and integers', 'The chapter demonstrates the printing of strings and floating point numbers with precision using the printf function']}, {'end': 1677.58, 'segs': [{'end': 1322.461, 'src': 'embed', 'start': 1285.058, 'weight': 0, 'content': [{'end': 1289.942, 'text': 'and this taught us how we can print different objects and different data types with different escape characters.', 'start': 1285.058, 'duration': 4.884}, {'end': 1292.405, 'text': "It's time we move on to loops now.", 'start': 1291.144, 'duration': 1.261}, {'end': 1298.052, 'text': "So, if you're new to programming, a loop is basically an iterating mechanism in computer science,", 'start': 1292.927, 'duration': 5.125}, {'end': 1302.315, 'text': "and it's used mostly when you need to perform a repetitive pattern in programming.", 'start': 1298.052, 'duration': 4.263}, {'end': 1310.162, 'text': 'now, in most programming languages, there are three types of loops, namely for vile and do vile, but golang has only one type of loop,', 'start': 1302.315, 'duration': 7.847}, {'end': 1311.383, 'text': 'and that is a for loop.', 'start': 1310.162, 'duration': 1.221}, {'end': 1315.847, 'text': 'the syntax of go, though, allows while loops to be implemented with the syntax of a for loop.', 'start': 1311.383, 'duration': 4.464}, {'end': 1322.461, 'text': "Now before we get to coding loops, let's take a look at the general structure that is followed and go for looping.", 'start': 1316.559, 'duration': 5.902}], 'summary': 'Introduction to loops in programming, highlighting the use of for loop in golang and the structure for looping.', 'duration': 37.403, 'max_score': 1285.058, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ1285058.jpg'}, {'end': 1558.109, 'src': 'embed', 'start': 1529.972, 'weight': 2, 'content': [{'end': 1534.953, 'text': "Okay, so let's implement decision making in our very own Go program now.", 'start': 1529.972, 'duration': 4.981}, {'end': 1539.434, 'text': 'So there are two ways you can actually implement decision making in Go programming.', 'start': 1535.773, 'duration': 3.661}, {'end': 1544.396, 'text': 'So one is through the if and else if, and the second one is through switch statements.', 'start': 1539.915, 'duration': 4.481}, {'end': 1547.962, 'text': "So let's try our very own decision-making program.", 'start': 1545.18, 'duration': 2.782}, {'end': 1553.946, 'text': "Ingo, so first we define an age, and now we're going to decide if this person can vote.", 'start': 1547.982, 'duration': 5.964}, {'end': 1558.109, 'text': 'So if age is greater than 18, then this guy can vote.', 'start': 1553.986, 'duration': 4.123}], 'summary': 'Implement decision making in go using if-else and switch statements, determining voting eligibility.', 'duration': 28.137, 'max_score': 1529.972, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ1529972.jpg'}], 'start': 1285.058, 'title': 'Loops and decision making in golang', 'summary': "Covers the significance of loops in programming, golang's unique approach with for loop, syntax for while loops, nested loops, if-else and switch statements in go programming.", 'chapters': [{'end': 1322.461, 'start': 1285.058, 'title': 'Introduction to loops in golang', 'summary': "Introduces the concept of loops in golang, explaining the significance of loops in programming and highlighting golang's unique approach with only one type of loop, the for loop, and its syntax that allows while loops to be implemented.", 'duration': 37.403, 'highlights': ['Golang has only one type of loop, the for loop, and its syntax allows while loops to be implemented.', 'Loops are used mostly when there is a need to perform a repetitive pattern in programming.', 'The chapter also mentions that in most programming languages, there are three types of loops, namely for, while, and do-while.']}, {'end': 1677.58, 'start': 1322.841, 'title': 'Go programming: loops and decision making', 'summary': 'Demonstrates the syntax and implementation of for loops, including nested loops, alternative while loop, and practical examples, followed by implementing decision-making control flow using if-else and switch statements in go programming.', 'duration': 354.739, 'highlights': ['Implementation of for loops The chapter introduces the syntax and implementation of for loops in Go programming, including the declaration of the iterator, setting the limit of the iterator, and incrementing the iterator, with practical examples of printing numbers and nested loops.', 'Decision-making control flow The chapter explains the usage of if-else and switch statements for decision-making control flow in Go programming, with practical examples of determining voting eligibility based on age and using specific operations for different cases using switch statements.']}], 'duration': 392.522, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ1285058.jpg', 'highlights': ['Golang has only one type of loop, the for loop, and its syntax allows while loops to be implemented.', 'The chapter introduces the syntax and implementation of for loops in Go programming, including the declaration of the iterator, setting the limit of the iterator, and incrementing the iterator, with practical examples of printing numbers and nested loops.', 'The chapter explains the usage of if-else and switch statements for decision-making control flow in Go programming, with practical examples of determining voting eligibility based on age and using specific operations for different cases using switch statements.', 'Loops are used mostly when there is a need to perform a repetitive pattern in programming.', 'The chapter also mentions that in most programming languages, there are three types of loops, namely for, while, and do-while.']}, {'end': 2077.831, 'segs': [{'end': 1722.787, 'src': 'embed', 'start': 1677.58, 'weight': 0, 'content': [{'end': 1685.55, 'text': "Let's prepare for college, and if we make this something like 78, then the default case will run and it'll just say are you even alive?", 'start': 1677.58, 'duration': 7.97}, {'end': 1687.613, 'text': "So that's how switch statements work.", 'start': 1686.231, 'duration': 1.382}, {'end': 1691.939, 'text': 'Okay, so that was all about decision making.', 'start': 1689.235, 'duration': 2.704}, {'end': 1695.072, 'text': "So now it's time we move to arrays.", 'start': 1692.771, 'duration': 2.301}, {'end': 1704.254, 'text': 'Now in Go programming language, we are given a data structure called an array which can store same types of data in one variable basically.', 'start': 1695.732, 'duration': 8.522}, {'end': 1710.475, 'text': "So suppose we have student count and it's gonna store 10 different student counts and it's of int type.", 'start': 1704.634, 'duration': 5.841}, {'end': 1711.755, 'text': "So that's how you define an array.", 'start': 1710.495, 'duration': 1.26}, {'end': 1714.816, 'text': 'So, basically, an array is used to store a collection of data,', 'start': 1712.095, 'duration': 2.721}, {'end': 1719.257, 'text': 'which is often more useful to think of an array as a collection of variables of the same type.', 'start': 1714.816, 'duration': 4.441}, {'end': 1722.787, 'text': "Now let's go and implement them in our Go program.", 'start': 1719.924, 'duration': 2.863}], 'summary': 'Introduction to decision making with switch statements and arrays in go programming language.', 'duration': 45.207, 'max_score': 1677.58, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ1677580.jpg'}, {'end': 1936.196, 'src': 'embed', 'start': 1889.507, 'weight': 4, 'content': [{'end': 1895.231, 'text': 'and that would also print out the values along with their indexes.', 'start': 1889.507, 'duration': 5.724}, {'end': 1901.174, 'text': 'So zero is at zero, two is at one, four is at two, six is at three, and eight is at four.', 'start': 1896.491, 'duration': 4.683}, {'end': 1904.816, 'text': "Now there's also something called slicing.", 'start': 1902.555, 'duration': 2.261}, {'end': 1911.68, 'text': 'Now every array can be sliced in every programming language that is there, and Golang is no different.', 'start': 1905.377, 'duration': 6.303}, {'end': 1920.105, 'text': 'So how exactly do we slice arrays? So what exactly is slicing? Well, slicing means that you are taking some subpart of the arrays.', 'start': 1912.381, 'duration': 7.724}, {'end': 1925.388, 'text': 'So suppose we want to slice this array from the third element, so we would only get these.', 'start': 1920.205, 'duration': 5.183}, {'end': 1927.189, 'text': 'So that would be our slice.', 'start': 1925.829, 'duration': 1.36}, {'end': 1929.791, 'text': "Now let's see how we can actually slice arrays.", 'start': 1927.81, 'duration': 1.981}, {'end': 1936.196, 'text': 'So mostly, sliced arrays are just like arrays, but you just leave out the slice of the array.', 'start': 1930.487, 'duration': 5.709}], 'summary': 'Golang arrays can be sliced to obtain subparts, demonstrated using indexes and values.', 'duration': 46.689, 'max_score': 1889.507, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ1889507.jpg'}, {'end': 2077.831, 'src': 'embed', 'start': 2017.805, 'weight': 2, 'content': [{'end': 2019.005, 'text': 'So we do it something like this.', 'start': 2017.805, 'duration': 1.2}, {'end': 2031.728, 'text': 'We go slice two and we use the make keyword and open close brackets and five comma 10 and you can copy the contents of one slice to another slice.', 'start': 2019.405, 'duration': 12.323}, {'end': 2037.309, 'text': 'So you could be like copy slice two into num slice.', 'start': 2031.788, 'duration': 5.521}, {'end': 2039.109, 'text': "Now let's print out stuff.", 'start': 2038.009, 'duration': 1.1}, {'end': 2043.59, 'text': 'So print Ellen and we print out slice two.', 'start': 2039.249, 'duration': 4.341}, {'end': 2044.87, 'text': "Let's see what happens.", 'start': 2044.09, 'duration': 0.78}, {'end': 2047.739, 'text': 'Okay, so this was like this.', 'start': 2046.278, 'duration': 1.461}, {'end': 2050.521, 'text': 'And as you guys can see, that was it.', 'start': 2049.04, 'duration': 1.481}, {'end': 2060.766, 'text': "Now we can also come and num slice out here and see that has also been copied into and it's the same as being copied into and it's the same thing.", 'start': 2051.301, 'duration': 9.465}, {'end': 2066.791, 'text': 'Amazing We can also append values to a slice and that is done with the append function.', 'start': 2060.947, 'duration': 5.844}, {'end': 2068.092, 'text': 'So we go slice three.', 'start': 2066.871, 'duration': 1.221}, {'end': 2077.831, 'text': "equals, so we wanna append something like numSlice, and we're gonna put three, zero, and minus one.", 'start': 2069.185, 'duration': 8.646}], 'summary': 'Copying and appending slices with make, copy, and append functions.', 'duration': 60.026, 'max_score': 2017.805, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ2017805.jpg'}], 'start': 1677.58, 'title': 'Go programming: decision making and arrays', 'summary': 'Covers decision making using switch statements and introduces arrays in go programming language, which can store 10 different student counts of int type, along with working with arrays in golang, including initializing, iterating, slicing, copying, and appending values, showcasing ease and flexibility.', 'chapters': [{'end': 1722.787, 'start': 1677.58, 'title': 'Go programming: decision making and arrays', 'summary': 'Covers decision making using switch statements and introduces arrays in go programming language, which can store 10 different student counts of int type, highlighting the data structure and its usage.', 'duration': 45.207, 'highlights': ['Arrays in Go programming language can store 10 different student counts and are of int type.', 'Switch statements in Go programming language work based on certain conditions, with a default case if the condition is not met.']}, {'end': 2077.831, 'start': 1722.947, 'title': 'Working with arrays in golang', 'summary': 'Covers initializing arrays, iterating through arrays, slicing arrays, copying array contents, and appending values to a slice in golang, emphasizing the ease and flexibility of working with arrays and slices.', 'duration': 354.884, 'highlights': ['Initializing arrays in Golang can be done by defining the array type and initializing its elements, such as initializing an array of even numbers with the values 0, 2, 4, 6, and 8.', 'Iterating through arrays in Golang can be achieved using a for loop and the range function, which allows for easy iteration through all the elements of the array, providing both the value and index of each element.', 'Slicing arrays in Golang involves creating subparts of the array, demonstrated by slicing an array from the third element to the fifth element and also slicing an array backwards to obtain a specific subpart of the array.', 'Copying array contents in Golang is accomplished by using the make keyword to create a new slice and then copying the contents of one slice to another, showcasing the flexibility of managing array data in Golang.', 'Appending values to a slice in Golang is achieved using the append function, which adds new elements to the end of the slice, demonstrated by appending the values 3, 0, and -1 to a slice.']}], 'duration': 400.251, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ1677580.jpg', 'highlights': ['Arrays in Go programming language can store 10 different student counts and are of int type.', 'Switch statements in Go programming language work based on certain conditions, with a default case if the condition is not met.', 'Appending values to a slice in Golang is achieved using the append function, which adds new elements to the end of the slice, demonstrated by appending the values 3, 0, and -1 to a slice.', 'Copying array contents in Golang is accomplished by using the make keyword to create a new slice and then copying the contents of one slice to another, showcasing the flexibility of managing array data in Golang.', 'Slicing arrays in Golang involves creating subparts of the array, demonstrated by slicing an array from the third element to the fifth element and also slicing an array backwards to obtain a specific subpart of the array.', 'Iterating through arrays in Golang can be achieved using a for loop and the range function, which allows for easy iteration through all the elements of the array, providing both the value and index of each element.', 'Initializing arrays in Golang can be done by defining the array type and initializing its elements, such as initializing an array of even numbers with the values 0, 2, 4, 6, and 8.']}, {'end': 2672.316, 'segs': [{'end': 2131.413, 'src': 'embed', 'start': 2103.073, 'weight': 0, 'content': [{'end': 2109.075, 'text': "So if you have a value to word, something like Theodore Roosevelt out here, he's matched to the value of his age.", 'start': 2103.073, 'duration': 6.002}, {'end': 2111.416, 'text': 'So we can create a map for such stuff.', 'start': 2109.515, 'duration': 1.901}, {'end': 2114.283, 'text': 'Now this is how you exactly declare a map.', 'start': 2112.142, 'duration': 2.141}, {'end': 2122.748, 'text': 'You go for the name of the map and then use the make keyword and then the map keyword and then the type of the value and then the type of the key.', 'start': 2114.704, 'duration': 8.044}, {'end': 2126.17, 'text': 'So int is the string is the key and the int is the value.', 'start': 2123.248, 'duration': 2.922}, {'end': 2131.413, 'text': "So it's better that we go and just implement it because it gives us a better understanding.", 'start': 2126.75, 'duration': 4.663}], 'summary': 'Creating a map in go with key-value pairs of type string and int.', 'duration': 28.34, 'max_score': 2103.073, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ2103073.jpg'}, {'end': 2311.399, 'src': 'embed', 'start': 2256.106, 'weight': 1, 'content': [{'end': 2261.29, 'text': 'Now before we move ahead, let me show that you can also find out the length of a map.', 'start': 2256.106, 'duration': 5.184}, {'end': 2265.073, 'text': "So we could go something like, let's print out length.", 'start': 2261.71, 'duration': 3.363}, {'end': 2267.715, 'text': 'So length of student age.', 'start': 2265.393, 'duration': 2.322}, {'end': 2271.398, 'text': "So this should give us one, two, three, four, five, six, let's see.", 'start': 2268.495, 'duration': 2.903}, {'end': 2274.38, 'text': "So that was six, that's amazing.", 'start': 2271.418, 'duration': 2.962}, {'end': 2283.007, 'text': 'Now, we can also have maps inside of maps, and this is mostly used when you have a mapping to a mapping.', 'start': 2275.18, 'duration': 7.827}, {'end': 2288.791, 'text': "You'll get to that when you actually code for the industry or something like that, but let me show you an example in a simplistic way.", 'start': 2283.407, 'duration': 5.384}, {'end': 2292.014, 'text': "So let's say this is what we do.", 'start': 2289.772, 'duration': 2.242}, {'end': 2294.396, 'text': 'So for a map inside a map.', 'start': 2292.354, 'duration': 2.042}, {'end': 2306.298, 'text': "suppose we have a map for a superhero and that is basically a map of a string, which is again map to a string And it's also string.", 'start': 2294.396, 'duration': 11.902}, {'end': 2311.399, 'text': 'So we would initialize something like this, a Superman.', 'start': 2307.538, 'duration': 3.861}], 'summary': 'Demonstration of finding length of a map and using map inside a map, with an example of a superhero map.', 'duration': 55.293, 'max_score': 2256.106, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ2256106.jpg'}, {'end': 2483.024, 'src': 'embed', 'start': 2453.052, 'weight': 3, 'content': [{'end': 2456.14, 'text': "That's what we learned and we have forgotten equal to out here.", 'start': 2453.052, 'duration': 3.088}, {'end': 2457.904, 'text': 'Now, that was all about maps.', 'start': 2456.24, 'duration': 1.664}, {'end': 2459.829, 'text': "Okay, so let's move forward.", 'start': 2458.666, 'duration': 1.163}, {'end': 2462.176, 'text': 'So next up we have functions.', 'start': 2460.555, 'duration': 1.621}, {'end': 2467.898, 'text': 'Now Golang also allows us to make our custom functions which will be used for our custom uses.', 'start': 2462.476, 'duration': 5.422}, {'end': 2474.28, 'text': 'So, like in this piece of code, you see out here we have a function called add and it takes in two arguments, which are A,', 'start': 2468.378, 'duration': 5.902}, {'end': 2477.822, 'text': "comma B and they're of type int, and they'll also return an int.", 'start': 2474.28, 'duration': 3.542}, {'end': 2483.024, 'text': 'So this is the return type that we have specified out here and then we are returning A plus B.', 'start': 2477.922, 'duration': 5.102}], 'summary': "Golang allows custom functions, like the 'add' function taking two int arguments and returning an int.", 'duration': 29.972, 'max_score': 2453.052, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ2453052.jpg'}, {'end': 2678.583, 'src': 'embed', 'start': 2648.868, 'weight': 4, 'content': [{'end': 2652.973, 'text': "four will be called, then four minus one, three will be called and we'll get the factorial.", 'start': 2648.868, 'duration': 4.105}, {'end': 2654.795, 'text': "So let's see if that works out for us.", 'start': 2653.433, 'duration': 1.362}, {'end': 2658.439, 'text': 'So num is not declared, but not used.', 'start': 2655.456, 'duration': 2.983}, {'end': 2661.683, 'text': 'Okay, yeah, we had to pass in num instead of five.', 'start': 2659.52, 'duration': 2.163}, {'end': 2669.613, 'text': 'So this should output 120 for us because that is the factorial of five and voila, we have 120.', 'start': 2663.226, 'duration': 6.387}, {'end': 2672.316, 'text': "So that's how you use recursion in Golang.", 'start': 2669.613, 'duration': 2.703}, {'end': 2678.583, 'text': "It's a very optimizable way of actually implementing a function where you're calling itself and you should always use recursion when possible.", 'start': 2672.656, 'duration': 5.927}], 'summary': 'Using recursion in golang to calculate factorial, resulting in 120.', 'duration': 29.715, 'max_score': 2648.868, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ2648868.jpg'}], 'start': 2080.652, 'title': 'Golang functions, recursion, arrays, and maps', 'summary': 'Covers slicing arrays and implementing maps, including declaration, initialization, accessing values, finding length, creating maps inside maps, custom functions with an example of adding numbers, using recursion to calculate factorial, achieving a factorial of 120, and demonstrating modularity and reusability.', 'chapters': [{'end': 2452.377, 'start': 2080.652, 'title': 'Arrays slicing and maps implementation', 'summary': 'Covers slicing arrays and implementing maps, including the declaration, initialization, accessing values, finding the length, and creating maps inside maps, with an example of mapping superheroes to their details.', 'duration': 371.725, 'highlights': ['Maps provide a key-value pair data structure, used for hash maps, and can be declared with the make and map keywords. Maps are used for hash maps and provide a key-value pair data structure. They can be declared using the make and map keywords.', 'Maps can be initialized with key-value pairs, and the length of a map can be found using the length function. Maps can be initialized with key-value pairs, and the length of a map can be found using the length function.', 'Maps can be nested inside other maps, and accessing the nested map values is demonstrated with an example of mapping superheroes to their details. Maps can be nested inside other maps, and the process of accessing the nested map values is demonstrated with an example of mapping superheroes to their details.']}, {'end': 2672.316, 'start': 2453.052, 'title': 'Custom functions and recursion in golang', 'summary': 'Covers creating custom functions in golang with an example of adding two numbers and using recursion to calculate the factorial of a number, demonstrating modularity and reusability, and achieving a factorial of 120.', 'duration': 219.264, 'highlights': ["Creating custom functions in Golang The chapter demonstrates creating a custom 'add' function in Golang that takes two integer arguments and returns their sum, promoting modularity and reusability.", 'Using recursion to calculate factorial The chapter illustrates using recursion in Golang to calculate the factorial of a number, showcasing the process of calling a function from inside itself until a base condition is met, resulting in the calculation of the factorial of 5 as 120.']}], 'duration': 591.664, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ2080652.jpg', 'highlights': ['Maps provide a key-value pair data structure, used for hash maps, and can be declared with the make and map keywords.', 'Maps can be initialized with key-value pairs, and the length of a map can be found using the length function.', 'Maps can be nested inside other maps, and accessing the nested map values is demonstrated with an example of mapping superheroes to their details.', "Creating custom functions in Golang The chapter demonstrates creating a custom 'add' function in Golang that takes two integer arguments and returns their sum, promoting modularity and reusability.", 'Using recursion to calculate factorial The chapter illustrates using recursion in Golang to calculate the factorial of a number, showcasing the process of calling a function from inside itself until a base condition is met, resulting in the calculation of the factorial of 5 as 120.']}, {'end': 3077.903, 'segs': [{'end': 2723.071, 'src': 'embed', 'start': 2693.314, 'weight': 0, 'content': [{'end': 2697.758, 'text': 'So defer statement differs the execution of a function until the surrounding function returns.', 'start': 2693.314, 'duration': 4.444}, {'end': 2703.641, 'text': 'So then multiple defers are pushed into a stack and executes in the last in first out order.', 'start': 2698.238, 'duration': 5.403}, {'end': 2707.563, 'text': 'now defer is generally used to clean up resources like files, database and connections.', 'start': 2703.641, 'duration': 3.922}, {'end': 2713.306, 'text': "So suppose you have opened a file using go and if you are open a file, you'll always have to close it.", 'start': 2707.643, 'duration': 5.663}, {'end': 2715.387, 'text': 'But some people might just forget.', 'start': 2713.426, 'duration': 1.961}, {'end': 2723.071, 'text': "so you could put a defer saying that you'll close the file after all these functions are done and defer will do that automatically for you.", 'start': 2715.387, 'duration': 7.684}], 'summary': 'Defer statement in go delays function execution, useful for resource cleanup.', 'duration': 29.757, 'max_score': 2693.314, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ2693314.jpg'}, {'end': 2760.457, 'src': 'embed', 'start': 2724.792, 'weight': 1, 'content': [{'end': 2734.458, 'text': 'now recover is another built-in function and go and it helps regain the normal flow of execution after a panic situation generally is used with the deferred statement to recover panic in a go routine.', 'start': 2724.792, 'duration': 9.666}, {'end': 2741.102, 'text': 'Thirdly, we have the panic function, which is similar to throwing an exception in any other language, like Java or C,', 'start': 2734.838, 'duration': 6.264}, {'end': 2747.766, 'text': 'and generally when a panic is called and the normal execution flow is stopped immediately and the deferred function are executed normally.', 'start': 2741.102, 'duration': 6.664}, {'end': 2749.547, 'text': 'It is a built-in function in Golang.', 'start': 2748.026, 'duration': 1.521}, {'end': 2751.988, 'text': "Now, let's see how these are actually used.", 'start': 2750.087, 'duration': 1.901}, {'end': 2756.091, 'text': 'So suppose we have two functions basically.', 'start': 2752.529, 'duration': 3.562}, {'end': 2760.457, 'text': 'So first run and second run.', 'start': 2756.696, 'duration': 3.761}], 'summary': 'The transcript discusses built-in functions in golang like recover and panic, used for regaining normal flow and stopping execution flow, with an example of two functions.', 'duration': 35.665, 'max_score': 2724.792, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ2724792.jpg'}, {'end': 2961.393, 'src': 'heatmap', 'start': 2915.06, 'weight': 0.922, 'content': [{'end': 2927.466, 'text': "Now you have a sum called demPanic and this is a demonstration of panic, and you defer a function where you're again gonna recover.", 'start': 2915.06, 'duration': 12.406}, {'end': 2930.628, 'text': "Let's print our recover statement here.", 'start': 2928.867, 'duration': 1.761}, {'end': 2935.971, 'text': 'And in the end, we can go and say pack.', 'start': 2933.069, 'duration': 2.902}, {'end': 2943.002, 'text': "Okay, so we also have to call them panic here and that's about it.", 'start': 2938.88, 'duration': 4.122}, {'end': 2944.583, 'text': "Let's save this and run.", 'start': 2943.663, 'duration': 0.92}, {'end': 2946.685, 'text': 'So this should throw an error basically.', 'start': 2944.603, 'duration': 2.082}, {'end': 2952.088, 'text': 'Yep, so you see we threw the error there was like nil and then panic.', 'start': 2946.705, 'duration': 5.383}, {'end': 2955.89, 'text': "So that's how you use defer with recover and panic.", 'start': 2952.268, 'duration': 3.622}, {'end': 2960.272, 'text': 'Now you can also pass an unlimited number of arguments to a function.', 'start': 2956.37, 'duration': 3.902}, {'end': 2961.393, 'text': 'I forgot to cover that.', 'start': 2960.433, 'duration': 0.96}], 'summary': 'Demonstration of panic and recover using defer, with an error thrown and nil response.', 'duration': 46.333, 'max_score': 2915.06, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ2915060.jpg'}], 'start': 2672.656, 'title': 'Go specific control structures', 'summary': 'Covers the use of defer, recover, and panic functions in golang, illustrating their practical applications and their impact on program execution.', 'chapters': [{'end': 3077.903, 'start': 2672.656, 'title': 'Understanding go specific control structures', 'summary': 'Covers the use of defer, recover, and panic functions in golang, illustrating their practical applications and their impact on program execution.', 'duration': 405.247, 'highlights': ['The defer statement in Golang is used to delay the execution of a function until the surrounding function returns, making it useful for cleaning up resources like files and database connections. Multiple defers are pushed into a stack and execute in the last in, first out order, providing a practical method for ensuring resource cleanup after function execution.', 'The recover function in Golang is employed to regain the normal flow of execution after a panic situation, often used in conjunction with the defer statement to recover panics in Go routines. Recover is a built-in function in Golang that helps restore the normal execution flow after a panic, showcasing its significance in handling exceptional situations in Go programs.', 'The panic function in Golang halts the normal execution flow immediately when called, and the deferred functions are executed normally. Panic serves as a counterpart to throwing exceptions in other languages, such as Java or C, and it plays a critical role in abruptly stopping program execution in certain error scenarios.']}], 'duration': 405.247, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ2672656.jpg', 'highlights': ['The defer statement delays function execution until the surrounding function returns, useful for cleaning up resources.', 'Recover function regains normal flow after a panic, often used with defer to recover panics in Go routines.', 'Panic function halts normal execution flow immediately when called, and deferred functions are executed normally.']}, {'end': 3600.088, 'segs': [{'end': 3132.322, 'src': 'embed', 'start': 3104.227, 'weight': 4, 'content': [{'end': 3108.408, 'text': "Okay, so now that we've covered the go specific function, let's move on to structures.", 'start': 3104.227, 'duration': 4.181}, {'end': 3113.169, 'text': 'So go allows you to define variables that can hold several data items of the same kind.', 'start': 3109.088, 'duration': 4.081}, {'end': 3114.51, 'text': 'So this is called a structure.', 'start': 3113.489, 'duration': 1.021}, {'end': 3121.451, 'text': 'now, structure is another user-defined data type available in go programming, which allows you to combine data items of different kinds.', 'start': 3114.51, 'duration': 6.941}, {'end': 3126.395, 'text': 'structures are used to represent a record, So suppose you want to keep track of the books in the library.', 'start': 3121.451, 'duration': 4.944}, {'end': 3132.322, 'text': 'you might want to track the following attributes of each book, like the title, the author, the subject of the book, the book ID,', 'start': 3126.395, 'duration': 5.927}], 'summary': 'Go allows defining structures to hold various data items of the same or different kinds.', 'duration': 28.095, 'max_score': 3104.227, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ3104227.jpg'}, {'end': 3182.957, 'src': 'embed', 'start': 3156.919, 'weight': 0, 'content': [{'end': 3162.361, 'text': 'and then we are passing in a rectangle type into an area function and we are gonna actually calculate the area.', 'start': 3156.919, 'duration': 5.442}, {'end': 3165.482, 'text': "So let's see how this works in a normal Go program.", 'start': 3162.641, 'duration': 2.841}, {'end': 3168.07, 'text': "Okay, so first let's delete all these things.", 'start': 3166.309, 'duration': 1.761}, {'end': 3172.352, 'text': "So first of all, let's define our structure first.", 'start': 3169.01, 'duration': 3.342}, {'end': 3178.975, 'text': "So let's see, type rectangle, and it's gonna be struct.", 'start': 3173.232, 'duration': 5.743}, {'end': 3182.957, 'text': "Now we're gonna keep this simple, so we're just gonna give this two things.", 'start': 3179.736, 'duration': 3.221}], 'summary': 'Passing rectangle type into area function to calculate the area in a go program.', 'duration': 26.038, 'max_score': 3156.919, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ3156919.jpg'}, {'end': 3301.059, 'src': 'embed', 'start': 3272.336, 'weight': 2, 'content': [{'end': 3275.618, 'text': "And now it's gonna print out both the height and the width for us.", 'start': 3272.336, 'duration': 3.282}, {'end': 3277.359, 'text': "So that's 10 and five, nice.", 'start': 3275.698, 'duration': 1.661}, {'end': 3284.435, 'text': 'Now we can define methods for rectangle by adding the receiver rectangle between the functions and the function name.', 'start': 3278.453, 'duration': 5.982}, {'end': 3286.095, 'text': 'So we can call it with the dot operator.', 'start': 3284.515, 'duration': 1.58}, {'end': 3288.336, 'text': 'So something like we need the area.', 'start': 3286.415, 'duration': 1.921}, {'end': 3291.037, 'text': "So let's say we have a funk area.", 'start': 3288.456, 'duration': 2.581}, {'end': 3294.538, 'text': 'Now we can also create custom functions for our structure.', 'start': 3291.517, 'duration': 3.021}, {'end': 3296.798, 'text': 'So suppose something like this.', 'start': 3294.898, 'duration': 1.9}, {'end': 3298.259, 'text': 'So we wanted to print the area.', 'start': 3296.878, 'duration': 1.381}, {'end': 3301.059, 'text': 'So we want an area function for our rectangle.', 'start': 3298.759, 'duration': 2.3}], 'summary': 'Rectangles have dimensions of 10 and 5, and custom area function is created.', 'duration': 28.723, 'max_score': 3272.336, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ3272336.jpg'}, {'end': 3409.068, 'src': 'embed', 'start': 3382.147, 'weight': 1, 'content': [{'end': 3388.309, 'text': 'Now the struct data type implements these interfaces to have method definitions for the method signature of the interface.', 'start': 3382.147, 'duration': 6.162}, {'end': 3394.114, 'text': "So basically you're going to have an interface like type shape and it has an interface of area.", 'start': 3388.869, 'duration': 5.245}, {'end': 3399.899, 'text': 'Now you basically have different area formulas for different shapes, like the area for rectangle is height into width,', 'start': 3394.334, 'duration': 5.565}, {'end': 3402.622, 'text': 'while the area of a circle is basically pi R square.', 'start': 3399.899, 'duration': 2.723}, {'end': 3404.023, 'text': 'So, okay.', 'start': 3403.022, 'duration': 1.001}, {'end': 3409.068, 'text': "So now that we know what interfaces are let's go and try them in our very own go program.", 'start': 3404.063, 'duration': 5.005}], 'summary': "Struct data type implements interfaces with method definitions for different shapes' area calculations in go program.", 'duration': 26.921, 'max_score': 3382.147, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ3382147.jpg'}], 'start': 3078.803, 'title': 'Go programming structures and interfaces', 'summary': 'Covers structures and interfaces in go programming, with a focus on creating and manipulating rectangles, culminating in the calculation of an area as 50, and demonstrates the implementation of interfaces for different shapes with examples of calculating areas for rectangles and circles using custom functions.', 'chapters': [{'end': 3360.84, 'start': 3078.803, 'title': 'Go programming: structures and functions', 'summary': 'Introduces the concept of structures in go programming, explaining its usage to combine data items of different kinds and demonstrating the creation and manipulation of a rectangle structure, culminating in the calculation of its area as 50.', 'duration': 282.037, 'highlights': ['The chapter demonstrates the creation of a rectangle structure in Go programming, showcasing the definition of its attributes such as height and width, along with the access and manipulation of these characteristics using the dot operator.', 'It explains the concept of structures in Go programming, highlighting their utility in combining data items of different kinds, using the example of tracking attributes of books in a library.', 'The chapter elaborates on the usage of functions in relation to structures, exemplifying the creation of a custom area function for the rectangle structure and its successful calculation of the area as 50.']}, {'end': 3600.088, 'start': 3360.961, 'title': 'Go programming: interfaces and implementations', 'summary': 'Introduces interfaces in go programming, explaining how structs implement interfaces to define method signatures for different shapes and demonstrates the implementation with examples of calculating the areas of rectangles and circles using custom functions.', 'duration': 239.127, 'highlights': ['Structs implement interfaces to define method signatures for different shapes, such as calculating the areas of rectangles and circles. Explanation of how structs implement interfaces; Example of calculating areas of different shapes', 'Demonstration of implementing interfaces in Go programming with examples of calculating the areas of rectangles and circles using custom functions. Demonstration of implementing interfaces; Example of custom functions for area calculation']}], 'duration': 521.285, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ3078803.jpg', 'highlights': ['The chapter demonstrates the creation of a rectangle structure in Go programming, showcasing the definition of its attributes such as height and width, along with the access and manipulation of these characteristics using the dot operator.', 'Demonstration of implementing interfaces in Go programming with examples of calculating the areas of rectangles and circles using custom functions. Demonstration of implementing interfaces; Example of custom functions for area calculation', 'The chapter elaborates on the usage of functions in relation to structures, exemplifying the creation of a custom area function for the rectangle structure and its successful calculation of the area as 50.', 'Structs implement interfaces to define method signatures for different shapes, such as calculating the areas of rectangles and circles. Explanation of how structs implement interfaces; Example of calculating areas of different shapes', 'It explains the concept of structures in Go programming, highlighting their utility in combining data items of different kinds, using the example of tracking attributes of books in a library.']}, {'end': 4100.483, 'segs': [{'end': 3641.677, 'src': 'embed', 'start': 3600.108, 'weight': 0, 'content': [{'end': 3608.315, 'text': 'As you guys can see, we have the area of the rectangle, which is 3000, which is basically 15 to 60, and we also got the area of the circle,', 'start': 3600.108, 'duration': 8.207}, {'end': 3610.276, 'text': 'which is 153.93..', 'start': 3608.315, 'duration': 1.961}, {'end': 3613.179, 'text': "So that's how you implement interfaces in a Golang program.", 'start': 3610.276, 'duration': 2.903}, {'end': 3618.392, 'text': "Okay, so now that we are done with interfaces, it's time we move on to file input output.", 'start': 3613.909, 'duration': 4.483}, {'end': 3627.339, 'text': 'So Golang lets us handle files and system processes with the OS package that is already pre-built into the Golang libraries.', 'start': 3618.773, 'duration': 8.566}, {'end': 3635.545, 'text': "Okay, so, instead of understanding code that is written on a PowerPoint presentation, it's much better that we go and execute code ourselves,", 'start': 3627.579, 'duration': 7.966}, {'end': 3637.346, 'text': "because that's the best way to learn coding.", 'start': 3635.545, 'duration': 1.801}, {'end': 3639.776, 'text': "Okay, so let's get on with file handling.", 'start': 3638.075, 'duration': 1.701}, {'end': 3641.677, 'text': 'So this is how you would handle a file.', 'start': 3639.856, 'duration': 1.821}], 'summary': 'Introduction to golang interfaces and file input output.', 'duration': 41.569, 'max_score': 3600.108, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ3600108.jpg'}, {'end': 3841.835, 'src': 'embed', 'start': 3815.692, 'weight': 2, 'content': [{'end': 3820.981, 'text': "So that's how you can actually import files, read them out, write to them, and that's all.", 'start': 3815.692, 'duration': 5.289}, {'end': 3830.787, 'text': 'So this has almost brought us to the end of our tutorial, but before we end, let me just show you guys how you could create a web server.', 'start': 3822.301, 'duration': 8.486}, {'end': 3837.112, 'text': 'So Golang gives you the opportunity or the ability to create a web server just in seconds,', 'start': 3831.308, 'duration': 5.804}, {'end': 3841.835, 'text': 'because it has an HTTP library and that allows us to do all sorts of things.', 'start': 3837.112, 'duration': 4.723}], 'summary': 'Golang enables quick web server creation using its http library.', 'duration': 26.143, 'max_score': 3815.692, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ3815692.jpg'}], 'start': 3600.108, 'title': 'Golang: interfaces, file handling, and web server', 'summary': "Covers implementing interfaces in golang with an area of the rectangle as 3000 and the area of the circle as 153.93 and then moves on to file handling, demonstrating the process of creating, writing to, and displaying a file stream using golang. it also demonstrates the process of creating a simplistic web server using golang's http library, showcasing the handling of different pages and outputs, running on localhost 8080.", 'chapters': [{'end': 3815.231, 'start': 3600.108, 'title': 'Golang: interfaces and file handling', 'summary': 'Covers implementing interfaces in golang, with an area of the rectangle as 3000 and the area of the circle as 153.93, and then moves on to file handling, demonstrating the process of creating, writing to, and displaying a file stream using golang.', 'duration': 215.123, 'highlights': ['Golang lets us handle files and system processes with the OS package that is pre-built into the Golang libraries. Golang provides file and system process handling capabilities through the pre-built OS package.', 'Implementing interfaces in Golang, with the area of the rectangle as 3000 and the area of the circle as 153.93. Demonstration of implementing interfaces in Golang with specific quantifiable data: area of the rectangle and circle.', 'Demonstration of the process of creating, writing to, and displaying a file stream using Golang. Step-by-step demonstration of creating, writing to, and displaying a file stream using Golang, providing practical insights into file handling in Golang.']}, {'end': 4100.483, 'start': 3815.692, 'title': 'Creating a golang web server', 'summary': "Demonstrates the process of creating a simplistic web server using golang's http library, showcasing the handling of different pages and outputs, running on localhost 8080.", 'duration': 284.791, 'highlights': ['The tutorial covers various topics including loops, maps, array structure interfaces, and creating a web server using Golang.', "The process of creating a web server using Golang's HTTP library is demonstrated, including the setup of handlers for different pages and the output to the screen.", "The server is set to run on localhost 8080, and upon accessing different routes such as '/' and '/hello', specific outputs are generated, showcasing the functionality of the web server."]}], 'duration': 500.375, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Q0sKAMal4WQ/pics/Q0sKAMal4WQ3600108.jpg', 'highlights': ['Demonstration of implementing interfaces in Golang with specific quantifiable data: area of the rectangle and circle.', 'Step-by-step demonstration of creating, writing to, and displaying a file stream using Golang, providing practical insights into file handling in Golang.', "The process of creating a web server using Golang's HTTP library is demonstrated, including the setup of handlers for different pages and the output to the screen.", 'Golang provides file and system process handling capabilities through the pre-built OS package.']}], 'highlights': ["Golang's superiority lies in addressing properties of the modern computing environment, especially in networking, cluster computing, and efficiency for running on hundreds or thousands of machines.", 'Golang has garnered fame in the developers community for its efficiency and resource optimization.', 'The tutorial covers golang basics, including variables, loops, decision making, arrays, functions, recursion, control structures, structures, interfaces, file handling, and web server implementation in golang, with practical examples and demonstrations, showcasing efficiency and ease of use.', 'Golang was created by Google to address problems faced in building big software for massive clusters.', 'Golang offers the fluidity and ease of construction required for problems of enormous scale.', 'Golang was created by Google to address problems faced in building big software for massive clusters.', 'Golang has only one type of loop, the for loop, and its syntax allows while loops to be implemented.', 'The chapter introduces the syntax and implementation of for loops in Go programming, including the declaration of the iterator, setting the limit of the iterator, and incrementing the iterator, with practical examples of printing numbers and nested loops.', 'The chapter explains the usage of if-else and switch statements for decision-making control flow in Go programming, with practical examples of determining voting eligibility based on age and using specific operations for different cases using switch statements.', 'Arrays in Go programming language can store 10 different student counts and are of int type.', 'Appending values to a slice in Golang is achieved using the append function, which adds new elements to the end of the slice, demonstrated by appending the values 3, 0, and -1 to a slice.', 'Copying array contents in Golang is accomplished by using the make keyword to create a new slice and then copying the contents of one slice to another, showcasing the flexibility of managing array data in Golang.', 'Maps provide a key-value pair data structure, used for hash maps, and can be declared with the make and map keywords.', "Creating custom functions in Golang The chapter demonstrates creating a custom 'add' function in Golang that takes two integer arguments and returns their sum, promoting modularity and reusability.", 'Using recursion to calculate factorial The chapter illustrates using recursion in Golang to calculate the factorial of a number, showcasing the process of calling a function from inside itself until a base condition is met, resulting in the calculation of the factorial of 5 as 120.', 'The defer statement delays function execution until the surrounding function returns, useful for cleaning up resources.', 'Recover function regains normal flow after a panic, often used with defer to recover panics in Go routines.', 'The chapter demonstrates the creation of a rectangle structure in Go programming, showcasing the definition of its attributes such as height and width, along with the access and manipulation of these characteristics using the dot operator.', 'Demonstration of implementing interfaces in Go programming with examples of calculating the areas of rectangles and circles using custom functions.', 'Step-by-step demonstration of creating, writing to, and displaying a file stream using Golang, providing practical insights into file handling in Golang.', "The process of creating a web server using Golang's HTTP library is demonstrated, including the setup of handlers for different pages and the output to the screen."]}