You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
245 B

package bimg
import (
"io/ioutil"
"os"
)
func Read(path string) ([]byte, error) {
data, err := os.Open(path)
if err != nil {
return nil, err
}
buf, err := ioutil.ReadAll(data)
if err != nil {
return nil, err
}
return buf, nil
}