blob: c65f1f077cc1c08da3a9686bdb11d3fcf8a95a97 (
plain) (
blame)
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
|
package main
import (
"encoding/json"
"fmt"
"os"
"golang.fcuny.net/numap/internal/hwids"
)
func main() {
hwdb, err := hwids.Load()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
nodes, err := findNodes(hwdb)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
out, err := json.Marshal(nodes)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Println(string(out))
}
|