Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “The net/http package implements a Server type that handles each request in a separate goroutine.”
A block of code is set as follows:
1: chn := make(chan bool) // Create an unbuffered channel 2: go func() { 3: chn <- true // Send to channel 4: }() 5: go func() { 6: var y bool 7: y <-chn // Receive from channel 8: fmt.Println(y) 9: }()
Any command-line input or output is written as follows:
{"row":65,"height":172.72,"weight":97.61} {"row":64,"height":195.58,"weight":81.266} {"row":66,"height":142.24,"weight":101.242} {"row":68,"height":152.4,"weight":80.358} {"row":67,"height":162.56,"weight":104.87400000000001}
Tips or important notes
Appear like this.