We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb3d6b5 commit 41a4a14Copy full SHA for 41a4a14
1 file changed
cmds/intelana/main.go
@@ -61,12 +61,18 @@ func main() {
61
fmt.Printf("ucode offset %x size %x\n", o, s)
62
}
63
64
+ doJson := false
65
+
66
fmt.Printf("\n== FIT ==\n")
- headers, err := fit.GetTable(data)
- j, err := json.MarshalIndent(headers, "", " ")
67
- if err != nil {
68
- log.Fatal(err)
+ table, err := fit.GetTable(data)
+ if doJson {
69
+ j, err := json.MarshalIndent(table, "", " ")
70
+ if err != nil {
71
+ log.Fatal(err)
72
+ }
73
+ fmt.Printf(string(j))
74
+ } else {
75
+ fmt.Printf("\n%s", table)
76
- fmt.Printf(string(j))
77
78
0 commit comments