I'm new to the language and so far what I have read doesn't explain what is happening here.
I was looking at JSON decoding.
Here is a function in the package:
func (dec *Decoder) Decode(v interface{}) error
There is similar notation here:
func (dec *Decoder) Buffered() io.Reader
How do these functions access the (dec *Decoder)
? Given that the second function has no parameters, I am guessing this is not something that must be passed directly in the function call but something similar?