More idiomatic Go.

It is possible to do it in one line, using this 'if' syntax sugar
construction.

Signed-off-by: Thiago Farina <tfarina@chromium.org>