8- Interfaces in golang (Urdu/Hindi)



8- Interfaces in golang (Urdu/Hindi)

8- Interfaces in golang (Urdu/Hindi)

In this tutorials will deeply cover possible interface type of golang.
We will look at
1) What is interfaces in golang.
2)What polymorphsim.
3)What is empty interface.
2)How to use multiple interface types.

Golang interfaces are used to define a set of methods that a type must implement in order to be considered as implementing the interface. An interface is defined using the keyword “interface” and contains a set of method signatures that the type should implement. Once a type implements all the methods specified in the interface, it is considered to be an implementation of the interface. This allows for code to be written in a way that is agnostic to the underlying type, which makes it easier to write code that works with multiple types. Additionally, interfaces can be used as an abstraction layer, allowing for a separation between the code and the underlying type, which makes it easier to work with different types.

For reference please visit the supporting link:
https://www.golangprograms.com/go-language/interface.html

https://gobyexample.com/interfaces

#golang #goInterfaces #interface