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
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 –
Greetings Everyone, I am Daksh (Officially – Deepak K G). I’m a Techie with more than 20 years of work experience and I’ve created this channel Code Sports (also CodeSports.ai ) to share the crux of my learning with an intention to help you in your learning journey.
I’ll primarily create contents on Software Development Ecosystem which will included the following
– Programming Languages
– Machine Learning
– Cloud Computing
– Working as a Team
– Requirements Management
– Frameworks and Estimations
– Gamification Techniques
I’m also an explorer by nature and I love to discover and explore things. I’d like to share all those thing which I think is worth sharing.
Last but not the least, I’ m a traveler and 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 join me in my journey 🙏🙏🙏
# SUBSCRIBE – https://www.youtube.com/CodeSportsAI?sub_confirmation=1
# INSTAGRAM – https://www.intagram.com/CodeSportsAI
# Twitter – https://www.twitter.com/CodeSportsAI
# Facebook – https://www.facebook.com/CodeSportsAI
source by Code Sports
go programming language