All:

This is mostly for internal i.e. not public struct and interfaces.  I have 
structs but I don't want code to access the fields directly.  I want to 
write some interfaces.  I am experimenting with lowercase for struct names 
and upper case for interface name but hide all accessors.  For example,

type connectionWrapper struct {
>
> id         string
>
> sessionID  string
>
> connection ttodbc.Connection
>
> }
>
>
>> // ConnectionWrapper interfaces wraps the data
>
> // WARING:  Lot of experiemntal stuff in this file
>
> type ConnectionWrapper interface {
>
> objectWrapper
>
> sid() string
>
> }
>
>
I thought I should avoid the getXXX convention but I run into naming issues 
-- I had to use sid() for sessionID.  I didn't want SessionID()

   1. Is there some accepted/best practice for this?
   2. Is there any issue with public interfaces which are empty since they 
   don't have any public functions?

With regards, 

-- 
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