Go (Golang) Tutorial #5 - Arrays & Slices

preview_player
Показать описание
Hey gang, in this Golang tutorial we'll talk about two more types - Arrays & Slices - and the differences between the two.

🐱‍👤 View this course in full without ads on Net Ninja Pro:

🐱‍💻 Course Files:

🐱‍👤 JOIN THE YOUTUBE NET NINJA GANG -

🐱‍💻 🐱‍💻 My Udemy Courses:

🐱‍💻 Useful playlists:

🐱‍💻 Social Links:
Рекомендации по теме
Комментарии
Автор

I've been following this course on Go each day as the videos come out. I find its just enough for me to go play with it and reinforce my learning as I go. I not only retain more but I gain a deeper understanding. Thanks for the great videos.

dwayne
Автор

Shaun, this is the best course of GO for beginners in this kind of languages. I was trying to get started with GO (coming from JavaScript) and it was so hard but you make learning GO as simple as learning Python. You are definitely the best instructor.

imlautaro
Автор

Just discovering Go. Thanks for making these tutorials.

NoahNobody
Автор

incredibly clear tutorial, thanks and congrats!

hunam_
Автор

Mmm, a typed language with proper arrays and c-style string formatting. All in.

sourcedecay
Автор

Will save this playlist for future purposes...just in case🙃

drhastings
Автор

your coures are so up to the point. the udemy courses I do are 30 to sometimes 50hrs long which makes me lose interest in them

swagathshetty
Автор

Awesome tutorial! You are explaining it so well!

Slizer
Автор

and that is freaking awesome, my friends.

osamagamal
Автор

Published 20 seconds ago! My like is the second one! Yay!

mulllaya
Автор

Hello, will you continue the Django tutorials?
I think you could make more videos about for example implementing the app into the webhost.

onlinehostpl
Автор

Nice videos Ninja, a kotlin playlist would do nicely!

davidarubuike
Автор

Would love to see Rust and Elixir with Phoenix also in the future!

sky_kryst
Автор

I am a golang beginer and I just have a warning anout slices and append.
I loose hours because of a code like:
path := []stuff{s1, s2, s3}
Then later in a slice of slice I have a loop with something like:
for _, s := range steps {
currentPath := append(path, s)
sliceOfSlice = append(sliceOfSlice, currentPath)
}
And here started my problems. Everything work as expected until I reach a certain point. The code behave like I append in the sliceOfSlice several time the last value of currentPath.
This is because I reached the capacity of path. The ugly fix I found is to create a new slice with a capacity of path + 1, then add the content of path + s:
currentPath := make([]stuff, 0, len(path)+1
currentPath = append(currentPath, path...)
currentPath = append(currentPath, s)
Do you have a better fix than this?

zerro
Автор

In your array name := [4]string{"yoshi", "mario", "peach", "browser"}. What happened if I print only 1 item in an array ?

tronganhnguyenthanh
Автор

Hey Shaun, please make such tutorials on Rust, please. this one doesn't have any good tutorials on youtube, you would be firstand people need quality Rust tuts

ratulr
Автор

What is the use case of arrays with immutable length?

MikeNugget
Автор

Good tutorial! But boy am I disappointed in Go's syntax...

basickarl
Автор

Alright I watched it.
And it feels like GO is just a dodgy version of JS. Even dodgier than TS.
However I heard it’s pretty popular and many companies moving their backend from Python to GO.

mulllaya