"..." is called an ellipsis (plural ellipses).

The presence or absence of the space is unimportant; you're seeing the way
gofmt formats it, but the parser doesn't care.  Since period is not a
legitimate constituent of an identifier name, they scan in separate tokens
either way.

On Thu, Apr 25, 2019 at 3:35 PM Andrew Price <aprice2...@gmail.com> wrote:

> Hey folks,
>
> A colleague wrote this:
>
> func (l *Logger) log2StdFormatted(level string, msgOrFormatOrArg
>> interface{}, args... interface{}) (formatted string) {
>
>
> Note the position of the space *between* the ... and interface{}, not
> before the ...
>
> [btw does "..." have an easy-to-search-for name?]
>
> It compiles, I think, but what what does it mean? My braincell hurts.
>
> I 'corrected' this and now my colleague is complaining :(
>
> Andy
>
> --
> 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.
>

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