Ensuring Interface Implementation at Compile Time in Go
In Go, we can’t implicitly implement interfaces like in some other languages. To ensure a type implements an interface, we explicitly check this by trying to cast the type to the interface. If the type doesn’t match, Go will give a compile-time error, and the code won’t compile

In Go, we can’t implicitly implement interfaces like in some other languages. To ensure a type implements an interface, we explicitly check this by trying to cast the type to the interface. If the type doesn’t match, Go will give a compile-time error, and the code won’t compile