On Thu, Jun 4, 2020 at 5:13 PM Trig <edb1...@gmail.com> wrote: > > And I did it again... posted from another gmail account by accident, and my > post is forever in 'approval status', lol. Basically what Robert here said. > > On Thursday, June 4, 2020 at 9:53:56 AM UTC-5, Robert Engels wrote: >> >> You need pointers to strings if you need a nil value to be represented which >> is often the case in databases.
That's a very expensive way to represent a simple boolean value. type String struct { S string Valid bool } is a value of the same size as a slice is, so passing it around has the same cost with no additional allocations. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-VNUAoMk5Fpy2FUgdAiT6e%3DNOYy-RA4T%3DOXkAXN4q9ufg%40mail.gmail.com.