On Thu, Aug 17, 2017 at 6:09 PM, Soumya Mukherjee <[email protected]>
wrote:
> I am new to Golang. What is/are the difference(s) between the following
> declarations?
>
> []T(nil)
>
> and
>
> []T {}
>
> Both seem to work identically for me.
>
https://play.golang.org/p/g6EFru8hUU
Literally the only difference.
> Also, I was not aware of the first syntax ([]T(nil). Can someone point me
> to the Go document where this is introduced?
>
https://golang.org/ref/spec#Conversions
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.