Basics
In Go methods can be defined on struct and non-struct types. In this case a receiver argument ias passed between `func` keyword and the method name (`Abs`):
Pointers
To modify struct values methods must be declared with pointer receivers:
Aug 31, 20201 min read
In Go methods can be defined on struct and non-struct types. In this case a receiver argument ias passed between `func` keyword and the method name (`Abs`):
To modify struct values methods must be declared with pointer receivers: