Google News
logo
Golang - Interview Questions
Explain Methods in Golang?
There is only one difference between Go methods and Go functions that is the methods of Golang contain receiver argument in them. The method can obtain the characteristics of the receiver with the cooperation of the receiver argument.
 
Syntax :
func(name type) method_name(param_list)(return_type)

{

     //code

}
Advertisement