You can get the code samples for this chapter from https://github.com/narenaryan/gorestful/tree/master/chapter4. This chapter's examples are in the form of a project instead of single programs. So, copy the respective directory to your GOPATH to run the code samples properly.