-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathmain.go
More file actions
39 lines (34 loc) · 702 Bytes
/
main.go
File metadata and controls
39 lines (34 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"fmt"
"os"
"github.com/mk6i/open-oscar-server/foodgroup"
)
func main() {
results, err := foodgroup.Jimm060FullInfoPayloadAudit()
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
var failed bool
for _, res := range results {
if res.Err != nil {
failed = true
fmt.Printf("%s: FAIL: %v\n", res.Name, res.Err)
if res.PayloadHex != "" {
fmt.Printf("%s: hex=%s\n", res.Name, res.PayloadHex)
}
for _, line := range res.Trace {
fmt.Printf(" %s\n", line)
}
continue
}
fmt.Printf("%s: OK hex=%s\n", res.Name, res.PayloadHex)
for _, line := range res.Trace {
fmt.Printf(" %s\n", line)
}
}
if failed {
os.Exit(1)
}
}