tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code06:14

Methods - Value Receivers - Go Lang Practical Programming Tutorial p.7

sentdex ↗

From the creator

Welcome to part 7 of the Go programming tutorial series. We've been talking about structs, and we saw how to create a struct in the previous tutorial, along with accessing values from the struct. Now, we're curious about how methods might work. While Go doesn't have classes, it does have methods. The methods are not defined within the struct, however. Instead, they're associated with the struct. Here, you can either let these methods just access data via working as a copy of the struct, or you can actually point through and modify the object. Methods that just access values are called value receivers and methods that can modify information are pointer receivers. Text tutorials and sample code: https://pythonprogramming.net/go/ https://twitter.com/sentdex https://www.facebook.com/pythonprogramming.net/ https://plus.google.com/+sentdex

Published 2017-10-23 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code