mid38 zgłoszeń
Wyjaśnij interfejsy w Go.
Interfejsy w Go definiują zestaw metod — każdy typ implementujący te metody automatycznie spełnia interfejs (duck typing). Puste interfejsy interface{} (od Go 1.18: any) przyjmują dowolny typ. Interfejsy umożliwiają polimorfizm bez dziedziczenia.