internal: avoid allocation

In order to pass a value as a variadic argument, Go allocates a slice.
This slice needs to be on the heap if the method is an
interface method, as it is unknown whether the slice
will escape. This can be avoided by returning a pointer
instead of an interface.

Change-Id: I6f0cb9a0c512515815116f0d0a515813ee7afaf5
Reviewed-on: https://go-review.googlesource.com/30273
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
1 file changed