czwartek, 11 czerwca 2020

[Let`s go with golang] Interface and letters

I came back to golang. So today ->Interface.
I write in Java a long time, so I have interface imagination, but Golang has other.
In java There is class with some interface. If class not implement interface, cant use function requring it.
But in Go There is type with methods and interface with same methods thats all( of course I think type and function use type)

I see difference thats in Java first is interface, in Go function.
------------------------------------------------------------------
Letter in golang
Intresting idea use letter to hermetization. I always know what is public and what is private.

CODE:
https://github.com/mikoxp/Go_code/commit/4e407545d7245926c892a7cd68ec56b00b0f2f0d
and fix
https://github.com/mikoxp/Go_code/commit/e25873731649d0c93de0e2f957a480cf0da262dc