Interfaces in Go are implicit and structurally typed, making them flexible and powerful. They can be converted into specific types or other interfaces. Embedded interfaces allow for composition of types, while method receivers enable handling of varying method parameters. Unexported methods can be used in partially exported interfaces, ensuring their usage within the package.
Table of contents
PreambleIntroductionImplicit and structurally typedInterface compatibilityThe empty interfaceThe nil interfaceInterfaces as valuesKeeping interfaces smallInterface compositionInterface conversionInterface embeddingPartially exported interfacesApplied interfacesConclusionCreditsReferencesSort: