|| at Nov 21, 2014 at 1:20 am
*string means pointer to a string. string is just a string. string can
either be empty, or not empty, sometimes people use *string to allow for
the pointer to be nil meaning optional.
Personally I don't think this is a good idea as it introduces null
pointers, MaybeString struct might be better with String() and IsValid()
On Thursday, November 20, 2014 11:36:12 PM UTC+13, reno....@gmail.com wrote:
Can anyone give me some explanation about *string and string? I tried to
use go-toml-config but it gave me *string type instead of string. I can't
find any explanation in http://golang.org/pkg/strings/.
Boy Sandy G.A.
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 firstname.lastname@example.org.
For more options, visit https://groups.google.com/d/optout.