Make Parse take raw NFC UID and 1K image.
Drop zip/JSON from the root API. dump remains an adapter for the Android app format; inventory and an AMS wand both call Parse(uid, image).
This commit is contained in:
+5
-8
@@ -2,21 +2,18 @@ package bambunfc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
"slices"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMergeFixtures(t *testing.T) {
|
||||
t.Parallel()
|
||||
f, err := os.Open("testdata/dumps.zip")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
uids := []string{
|
||||
"e27be276", "52d60177", "92a80577", "b2d32177", "92b6fb31", "f28c58ed",
|
||||
}
|
||||
defer f.Close()
|
||||
tags, err := ParseZip(f)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
tags := make([]Tag, 0, len(uids))
|
||||
for _, id := range uids {
|
||||
tags = append(tags, parseFile(t, id))
|
||||
}
|
||||
spools, err := Merge(tags)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user