Skip to Content
Building RESTful Web services with Go
book

Building RESTful Web services with Go

by Naren Yellavula
December 2017
Intermediate to advanced
316 pages
6h 58m
English
Packt Publishing
Content preview from Building RESTful Web services with Go

Installation

Installing the Mux package is fairly simple. You need to run this command in the Terminal (Mac and Linux):

go get -u github.com/gorilla/mux

If you get any errors saying package github.com/gorilla/mux: cannot download, $GOPATH not set. For more details see--go help gopath, set the $GOPATH environment variable using the following command:

export GOPATH=~/go

As we discussed in the previous chapter, this says that all the packages and programs go into this directory. It has three folders: bin, pkg, and src. Now, add GOPATH to the PATH variable, to use the installed bin files as system utilities that have no ./executable style. Refer to the following command:

PATH="$GOPATH/bin:$PATH"

These settings stay until you turn off your machine. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RESTful Web Services with Go - Second Edition

Hands-On RESTful Web Services with Go - Second Edition

Naren Yellavula
Microservices with Go

Microservices with Go

Alexander Shuiskov

Publisher Resources

ISBN: 9781788294287Supplemental Content