Lets Go. Welcome to the video series on Go Programming Language i.e. GoLang.
In this video, I'm talking about one of the most interesting topic of Go Programming Language called Slices in Go. Slices in go is the preferred way of creating group of data and you are going to use the slices more often in your go language code.
Slices are similar to arrays but go slices doesn't have length as part of the type unlike arrays, so with slices its possible to assign slices of different types.
Also slices unlike arrays can be extended and it doesn't have a fixed length. Slices can be extended just like vectors in C++ or Java programming language. There are a couple of things which works behind the scene for slices they are length and capacity of the slices.
In this video, we'll not only understand how length and capacity impact the working of slices. Towards the end of this video we'll also talk about the go make function which is used for creating empty slices with different length and capacity
I hope and believe that you'll like this video. Here are the contents of this video
Timecodes
0:00 : golang slices
1:00 : Create Slices in Go
1:16 : Initializing Go Slices
2:03 : Difference between slices and arrays in golang
3:27 : Length of slices in go
4:12 : iterate through slices in go
4:39 : golang range
5:17 : for loop in go
6:31 : golang range optional index variable
7:39 : length and capacity of slices in go
8:39 : Append data in golang slices
9:26 : capacity change in golang slices
12:00 : golang make slice
14:02 : Different length and capacity in golang
#golang #programming #goarrays #goslices #goprogramming
About Me i.e. An Insightful Techie
Greetings and Thanks a lot for checking out my YouTube Channel. I’m Deepak K Gupta (Daksh). This channel is a medium for me to share my learnings and journey as a Techie so that you not only learn from my experience but also from my mistakes
As a techie I am closely associated with software development, so most of my content will revolve around Programming Languages, AI, Machine learning and Databases. I share things which will help you learn, remember and use these things in an effective and efficient way.
As a Techie, I also know that there is a life beyond software development and it has a profound impact on our career as well as on our well being. I also share those learnings which I feel are worth sharing with the intention that it MAY help you in taking better decisions in your life.
Last but not the least, I'm a traveler and explorer by nature. I would like to take you with me on some of the interesting journeys around the world. Believe me there is more to learn outdoors than indoors
Hope you’ll like my contents and will be part of my journey 🙏
SUBSCRIBE - https://www.youtube.com/AnInsightfulT...
INSTAGRAM - https://www.intagram.com/AnInsightful...
Twitter - / awisetechie
Facebook - / aninsightfultechie