[go-nuts] Re: Assignment of pointer values in a struct...

2020-06-04 Thread eric . brown
When you need to differentiate between nil and and empty string (because whatever you're assigning to, a "" may be valid). For lack of time (and going into detail myself), here's a write-up on a reason why: https://dhdersch.github.io/golang/2016/01/23/golang-when-to-use-string-pointers.html A

[go-nuts] Re: Assignment of pointer values in a struct...

2020-06-04 Thread Jake Montgomery
Trig, I'm very curious why you want to use a pointer to a string? Since strings are immutable, and already are like "pointers" internally, I have rarely, if ever, used *string in go. What is it that you achieve by doing this? - Jake On Wednesday, June 3, 2020 at 10:33:31 PM UTC-4, Trig wrote: