Wasn't sure if there was an error condition that would mean you couldn't call buffer.String if err != nil, but on stopping and actually thinking... that's silly ;-)