Interfaces in Go are SO GOOD - Go / Golang Interface Tutorial

preview_player
Показать описание

Despite not having Object Oriented Programming language features, Go does still have interfaces.

Interfaces allow you to interchange what data types you are passing as arguments to a function, as long as that type has the required methods.

Interfaces in Go are different compared to, say, C# or Java, in that you don't have to explicitly state you are implementing an interface, which is pretty cool.

### THANK YOU ###
Newest Channel Member -
Newest Subscriber - Phillip Lineburg

### WANT TO SUPPORT THE CHANNEL? ###

### WANT TO ASK ME A QUESTION? ###

### SOCIAL PLATFORMS ###

### VIDEO PLATFORMS ###

### OTHER THINGS ###

### SOFTWARE I USE ###

Thank ya'll for your time and support!

#golang #go #interfaces
Рекомендации по теме
Комментарии
Автор

I was taking "a tour of go" and got tripped up a lil bit. this was the first video and you cleared it right up for me. thanks brother, I appreciate you ☮🙏🏽

ozzyfromspace
Автор

Been using your series to get up to speed with Go. You've got a great teaching style, It's a lot easier to stay engaged with a lesson that feels more like an authentic interaction and less like a formal lesson in a lecture hall.

gabesusman
Автор

Thank you; I've gone through a lot of content describing/demonstrating interfaces but yours is the most concise and clear

MeeGrimlock
Автор

Thanks for the explanation Man!
This is gonna save a lot of confusion for me! 💯

gaurangpatel
Автор

Very nice and clear! thank you so much!

MDMonirulIslam-plyu
Автор

deffinitely the most concise and clear ( as J said ) - thanks for this very good explanation. The aspect of 're-use' could be another video ? say not just reuse of the io package but reuse of the 'printer faxer scanner' mebe ? also this has application in the area of testing - ie 'mocking' a back end, a db for example - I can see it has many uses, thanks again for this eye opener - you explain this very well indeed !

JonBrookes
Автор

simple and practical explanation, great job!

anarrzayev
Автор

thank youu, great explanation. well done

nikowahyufitrianto
Автор

Thank you for the video, I found it really useful.
I have one question, you mentioned that it's great that go has implicit interfaces, rather than explicit. I can't come up with an example where it could be better. It would be cool if you can explain or send a link where I can read about it. Thanks :)

artemcodes
Автор

I've been loving your go videos man. Got any more planned?

ZachPeters
Автор

got new insight how to implement interface in Go, thanks

ultiumlabs
Автор

Awesome stuff. What font and prompt do you use? Assume it’s zsh.

farhanyousaf
Автор

what a good font. Where i can get that?

haxidenti
Автор

Clearly explained, thanks. By the way what font are you using?

AntonyMapfumo
Автор

I am here to learn more about the interface, but it is excellent to know Go allows the same name methods with the different receivers.

slayeeerrr
Автор

Hi! If both the structs should have the same printing method (we need only one print method for all structs), How we can do that? (the receiver should accept all the structs) .

medhathelmy
Автор

Idk man. A printer should only be able to just print. Ie return string err, Could just be a return error for trying to fax on a printer. The if err! = nil then...

ashtwenty
Автор

I feel you should put down a design before getting into code. I watched the video twice to understand what you were trying to achieve. second thing, impacting content is lesser, can be finished in 12-15 mins.

shivah
join shbcf.ru