Skip to content

Commit 41a4a14

Browse files
committed
intelana: print FIT also as table
Signed-off-by: Daniel Maslowski <info@orangecms.org>
1 parent eb3d6b5 commit 41a4a14

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

cmds/intelana/main.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,18 @@ func main() {
6161
fmt.Printf("ucode offset %x size %x\n", o, s)
6262
}
6363

64+
doJson := false
65+
6466
fmt.Printf("\n== FIT ==\n")
65-
headers, err := fit.GetTable(data)
66-
j, err := json.MarshalIndent(headers, "", " ")
67-
if err != nil {
68-
log.Fatal(err)
67+
table, err := fit.GetTable(data)
68+
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)
6976
}
70-
fmt.Printf(string(j))
7177
}
7278
}

0 commit comments

Comments
 (0)