June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package context import "context" type key string const ( timeoutKey key = "TimeoutKey" deadlineKey key = "DeadlineKey" ) // Setup sets some values func Setup(ctx context.Context) context.Context { ctx = context.WithValue(ctx, timeoutKey, "timeout exceeded") ctx = context.WithValue(ctx, deadlineKey, "deadline exceeded") return ctx } // GetValue grabs a value given a key and ...Read now
Unlock full access