June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package negotiate import ( "net/http" "github.com/unrolled/render" ) // Negotiator wraps render and does // some switching on ContentType type Negotiator struct { ContentType string *render.Render } // GetNegotiator takes a request, and figures // out the ContentType from the Content-Type header func GetNegotiator(r *http.Request) *Negotiator { contentType := r.Header.Get("Content-Type") ...Read now
Unlock full access