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

Channel:
Subscribers:
1,410,000
Published on ● Video Link: https://www.youtube.com/watch?v=i3o4G4bmqPc



Category:
Tutorial
Duration: 6:14
62,047 views
815


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




Other Videos By sentdex


2017-11-03Using templates - Go Lang Practical Programming Tutorial p.17
2017-11-02HTML templates - Go Lang Practical Programming Tutorial p.16
2017-11-01Mapping news data - Go Lang Practical Programming Tutorial p.15
2017-10-30Maps - Go Lang Practical Programming Tutorial p.14
2017-10-29Continuing our Go Web application - Go Lang Practical Programming Tutorial p.13
2017-10-28Looping - Go Lang Practical Programming Tutorial p.12
2017-10-28Parsing XML - Go Lang Practical Programming Tutorial p.11
2017-10-27Accessing the internet - Go Lang Practical Programming Tutorial p.10
2017-10-27More web dev basics - Go Lang Practical Programming Tutorial p.9
2017-10-23Pointer Receivers - Go Lang Practical Programming Tutorial p.8
2017-10-23Methods - Value Receivers - Go Lang Practical Programming Tutorial p.7
2017-10-23Structs - Go Lang Practical Programming Tutorial p.6
2017-10-21Simple Web App - Go Lang Practical Programming Tutorial p.5
2017-10-21Pointers - Go Lang Practical Programming Tutorial p.4
2017-10-21Types - Go Lang Practical Programming Tutorial p.3
2017-10-21Syntax - Go Lang Practical Programming Tutorial p.2
2017-10-21Introduction - Go Lang Practical Programming Tutorial p.1
2017-09-11Acquiring a Vehicle for the Agent - Python Plays GTA V p.20
2017-09-11Getting the Agent a Vehicle- Python Plays GTA V p.19
2017-09-04Determining other vehicle distances & collision warning (object detection) - Self Driving Cars p.18
2017-09-04Object detection with Tensorflow - Self Driving Cars p.17



Tags:
method
value receiver
pointer receiver
Go
Go lang
go programming
tutorial
programming