On Thu, Apr 25, 2019 at 1: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 ...

args<sp>...interface{}
args<sp>...<sp>interface{}
args...interface{}

They all mean the same thing, that this is a variadic function. Within
the function, 'args' is a slice.


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