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: “Lastly, update the main function to create a cache with a specified capacity and test the TTL and LRU features.”
A block of code is set as follows:
func main() {
cache := NewCache(5) // Setting capacity to 5 for LRU
cache.startEvictionTicker(1 * time.Minute)
} Any command-line input or output is written as follows:
go run main.go -port=:8080 -peers=http://localhost:8081
Tips or important notes
Appear like this.