Skip to content

Files

Latest commit

 

History

History
34 lines (13 loc) · 1.66 KB

building-microservices-with-go.md

File metadata and controls

34 lines (13 loc) · 1.66 KB

Building Microservices with Go

> Home

Context

The Context type implements a safe method for accessing request-scoped data that is safe to use simultaneously by multiple Go routines (link)

Marshalling Go structs to JSON

are decoding our struct into a byte array and then writing that to the response stream, this does not seem to be particularly efficient and in fact it is not. (link)

Unmarshalling JSON to Go structs

The JSON that has been sent with the request is accessible in the Body field. Body implements the interface io.ReadCloser as a stream and does not return a []byte or a string. (link)

TimeoutHandler

you use the golint command that comes with the standard package then this will report areas of your code which do not conform to the standards (link)

Building a simple web server with net/http

Since ListenAndServe blocks if the server starts correctly we will never exit on a successful start. (link)

> Home