If you simply return unexported data types, there is no way your data 
users can understand what your data type does since godoc does not document 
unexported types.  

On Thursday, March 2, 2017 at 1:27:42 PM UTC+7, Tamás Gulácsi wrote:
>
> Accept interface (the smallest possible) but return concrete type - 
> possibly a pointer.
> If you don't want people to mess with your data type directly, unexport 
> (lowercase the first rune in the name) your data type.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to