I\'m new to interfaces and trying to do SOAP request by github
I don\'t understand the meaning of
Msg interface{}
in this code:
From the Golang Specifications:
An interface type specifies a method set called its interface. A variable of interface type can store a value of any type with a method set that is any superset of the interface. Such a type is said to implement the interface. The value of an uninitialized variable of interface type is nil.
A type implements any interface comprising any subset of its methods and may therefore implement several distinct interfaces. For instance, all types implement the empty interface:
interface{}
The concepts to graps are:
T has 3 methods: A, B, C.T_interface = (A, B, C)MyInterface = (A, )MyInterface have to be contained inside T_interfaceYou can deduce that all the "interface types" of all the types are a superset of the empty interface.