DEV Community

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

Posted on

2

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)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay