Update README to reflect fix in generated file.

This commit is contained in:
jim teeuwen 2012-03-06 19:31:58 +01:00
parent fea0fad8ad
commit 360acac596

View File

@ -20,17 +20,18 @@ converted to a raw byte slice.
It looks like this: It looks like this:
func gophercolor_png() ([]byte, error) { func gophercolor_png() ([]byte, error) {
var gz *gzip.Decompressor gz, err := gzip.NewReader(bytes.NewBuffer([]byte{
var err error
if gz, err = gzip.NewReader(bytes.NewBuffer([]byte{
... ...
})); err != nil { }))
if err != nil {
return nil, err return nil, err
} }
var b bytes.Buffer var b bytes.Buffer
io.Copy(&b, gz) io.Copy(&b, gz)
gz.Close() gz.Close()
return b.Bytes(), nil return b.Bytes(), nil
} }