diff --git a/appendixA/messycode/main.go b/appendixA/messycode/main.go new file mode 100644 index 0000000..d2a0ca0 --- /dev/null +++ b/appendixA/messycode/main.go @@ -0,0 +1,11 @@ +package main + +func main() { +data := struct { +Message string `json:"message"` +}{Message: "Hello world"} +err := json.NewEncoder(os.Stdout).Encode(data) +if err != nil { +log.Fatalln(err) +} +}