June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package context import ( "context" "github.com/apex/log" ) type key int // logFields is a key we use // for our context logging const logFields key = 0 func getFields(ctx context.Context) *log.Fields { fields, ok := ctx.Value(logFields).(*log.Fields) if !ok { f := make(log.Fields) fields = &f } return fields } // FromContext takes an entry and a context // then returns an entry ...Read now
Unlock full access