Go Interfaces: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * The Type System =Overview= <font color=red>Interfaces are not types.</font> <font color=red>Can only...") |
No edit summary |
||
Line 12: | Line 12: | ||
<font color=red>Can only structs be interfaces, or there are other things that can be interfaces?</font> | <font color=red>Can only structs be interfaces, or there are other things that can be interfaces?</font> | ||
=Definition= | |||
<pre> | |||
type MyInterface interface { | |||
functionName1() return_type | |||
functionName2() return_type | |||
... | |||
} | |||
</pre> |
Revision as of 16:56, 30 March 2016
Internal
Overview
Interfaces are not types.
Can only structs be interfaces, or there are other things that can be interfaces?
Definition
type MyInterface interface { functionName1() return_type functionName2() return_type ... }