From 06b553ab3f6355e643049dad0ccb570a0bc0d613 Mon Sep 17 00:00:00 2001 From: kaa Date: Sat, 25 Nov 2023 12:40:23 -0800 Subject: WIP Directory traversal using go. --- cantree/test/t.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cantree/test/t.go (limited to 'cantree/test/t.go') diff --git a/cantree/test/t.go b/cantree/test/t.go new file mode 100644 index 0000000..203d6b9 --- /dev/null +++ b/cantree/test/t.go @@ -0,0 +1,17 @@ +package main + +import ( + "fmt" + "encoding/json" + "io" + "os" +) + +func main() { + in, _ := os.Open("example.json") + contents, _ := io.ReadAll(in) + + var m map[string]interface{} + json.Unmarshal(contents, &m) + fmt.Printf("%v\n", m) +} \ No newline at end of file -- cgit v1.2.3