Go (Golang) Tutorial #10 - Multiple Return Values

preview_player
Показать описание
Hey gang, in this golang tutorial we'll take a look at how to return multiple values from a function.

🐱‍👤 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:
Рекомендации по теме
Комментарии
Автор

Hello Shaun, may I suggest course not precisely about programming language but about good practises? How to manage your files in slightly bigger projects, when and how split the code etc.? I think that would be life saver for a lot of people, give it a thought if you can, cheers :D

Etheriiss
Автор

I'm really enjoying this, more Go videos please

bobbyutulu
Автор

Hey Net Ninja, please do more Flutter Tutorials! :)

nickreutlinger
Автор

I just came here to like your video. Also can you make react testing tutorial either in Udemy or on YouTube?

sumukhakb
Автор

1- we cant store a multi return functions return in one value
2- how append works in action
3- handling different situations in return of a function
4- return of Split is unexpected and we cant set an explicit array for storing return of it

navidmafi
Автор

As in many languages, I can't help thinking the creators of Go tried hard to use a "different" syntax in several places just to be different.

tractorboy
Автор

another implementation of strings.Title is this
package main

import (
"fmt"
"strings"
)

func capitalize(s string) string {
if len(s) == 0 {
return s
}
words := strings.Fields(s)
result := []string{}
for _, word := range words {
word = + strings.ToLower(word[1:])
result = append(result, word)
}
return strings.Join(result, " ")
}

func main() {
Hawkins"))
}

ForbiddenWords
Автор

Have you ever thought of doing a Swift series?

samuelnatale
Автор

Hi Shawn,

I am doing your Udemy course, and I am doing events there. Quick irrelevant question and I would appreciate it if you answered it:

What are handlers when it comes to events? I mean, I haven't heard you use the term "handler" yet, but anywhere I look online, the term is used a lot. Is it the event? Is the eventListener? Is it the block of code that fires once the event occurs? Or...?

Thanks a lot,
Faraz

farazk
Автор

This language is not ready to be elegant and for fast development yet, too many things just to return two values, what a let down, I had more expectations...

tavoochoa
Автор

It's always a bliss learning from the Alpha Ninja

Modified the getInitials func to return a single string of joined initials.

func getInitials(fullname string) string {
var nArr = strings.Split(strings.ToUpper(fullname), " ")
var inits []string
for _, value := range nArr {
inits = append(inits, value[:1])
}
return strings.Join(inits, ".")
}

coderke
visit shbcf.ru