Skip to content

Commit

Permalink
added messy code example
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Oct 14, 2016
1 parent 3779aca commit a4e0ac5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions appendixA/messycode/main.go
Original file line number Diff line number Diff line change
@@ -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)
}
}

0 comments on commit a4e0ac5

Please sign in to comment.