mirror of https://github.com/dsoprea/go-exif.git
37 lines
616 B
Go
37 lines
616 B
Go
package exif
|
|
|
|
import (
|
|
"os"
|
|
"path"
|
|
|
|
"encoding/binary"
|
|
"io/ioutil"
|
|
|
|
"github.com/dsoprea/go-logging"
|
|
)
|
|
|
|
var (
|
|
TestDefaultByteOrder = binary.BigEndian
|
|
|
|
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)
|
|
}
|