DEV Community

Cover image for Golang encapsulation for protected fields – quick insight
LG
LG

Posted on

Golang encapsulation for protected fields – quick insight

My personal insight (TL;DR) :

"A struct encapsulation within dedicated module with structs' un-exported fields, but exported setter-like and getter-like method(s) within such dedicated module yields similar practice of protected class behaviour in such languages as e.g. – PHP"

Top comments (0)