Created
February 28, 2018 19:09
-
-
Save joejulian/2966f02cb2468920600eda1790c48b57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bindata | |
import ( | |
"bytes" | |
"compress/gzip" | |
"fmt" | |
"io" | |
"strings" | |
) | |
func bindata_read(data []byte, name string) ([]byte, error) { | |
gz, err := gzip.NewReader(bytes.NewBuffer(data)) | |
if err != nil { | |
return nil, fmt.Errorf("Read %q: %v", name, err) | |
} | |
var buf bytes.Buffer | |
_, err = io.Copy(&buf, gz) | |
gz.Close() | |
if err != nil { | |
return nil, fmt.Errorf("Read %q: %v", name, err) | |
} | |
return buf.Bytes(), nil | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment