1
0
mirror of https://github.com/dsoprea/go-exif.git synced 2025-04-27 13:12:39 +00:00
go-exif/common_test.go
2018-06-16 09:49:14 -04:00

33 lines
499 B
Go

package exif
import (
"os"
"path"
"io/ioutil"
"github.com/dsoprea/go-logging"
)
var (
assetsPath = ""
testExifData = make([]byte, 0)
)
func init() {
goPath := os.Getenv("GOPATH")
if goPath == "" {
log.Panicf("GOPATH is empty")
}
assetsPath = path.Join(goPath, "src", "github.com", "dsoprea", "go-exif", "assets")
// Load test EXIF data.
filepath := path.Join(assetsPath, "NDM_8901.jpg.exif")
var err error
testExifData, err = ioutil.ReadFile(filepath)
log.PanicIf(err)
}