OK, then I think you've answered your own question; your uses should
handle the nils, rather than papering over them by assigning a pointer
to "".

If you expect to have "" when the value is empty, just use string.

On Tue, 2017-08-22 at 17:39 -0700, Eric Brown wrote:
> Yeah, sometimes it's better to use a pointer to a string when dealing
> with 
> possible null|nil values and you plan on deserializing json or yaml,
> which 
> I'm doing a lot of for an api.  There are a few other instances where
> you'd 
> probably want to also...



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