Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to see method's receiver when there are double

I am trying to understand this example.
Is Ccc method of aaa OR bbb or aaa.bbb().

When I go to github, and click on Ccc, I see bunch of Definitions and it’s very inconvenience not knowing where to look.

ans := aaa.Bbb().Ccc()

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Real example
https://github.com/CyCoreSystems/ari/blob/master/_examples/play/main.go

sub := cl.Bus().Subscribe(nil, "StasisStart")

>Solution :

I am trying to understand this example. Is Ccc method of aaa OR bbb or aaa.bbb().

Ccc() is a method of whatever type Bbb() returns. This code:

ans := aaa.Bbb().Ccc()

Is the same as this code:

temp := aaa.Bbb()
ans := temp.Ccc()
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading