func GetWidgets(w http.ResponseWriter, req *http.Request) {
	widgetsJSON, err := json.Marshal(AllWidgets)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}
	w.Header().Set("Content-Type", "application/json")
	fmt.Fprintf(w, string(widgetsJSON))
}
GetWidgets retrieves the collection of Widgets
package widgets
import (
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"strconv"
	"github.com/gorilla/mux"
)
type Widget struct {
	Id   int64
	Name string
	Role string
}
var AllWidgets []Widget
func init() {
	AllWidgets = []Widget{
		Widget{0, "Nothing", "N/A"},
		Widget{1, "Jibjab", "Instrument"},
		Widget{2, "Pencil", "Utensil"},
		Widget{3, "Fork", "Utensil"},
		Widget{4, "Password", "Credential"},
		Widget{5, "SpanFrankisco", "Home"},
		Widget{6, "Doc", "Villain"},
		Widget{7, "Coff3e", "Hack"},
	}
}
func AddRoutes(r *mux.Router) {
	r.HandleFunc("/widgets", GetWidgets).Methods("GET").Name("GetWidgets")
	r.HandleFunc("/widgets", PostWidget).Methods("POST").Name("PostWidget")
	r.HandleFunc("/widgets/{id}", GetWidget).Methods("GET").Name("GetWidget")
}