type contextKey … var keyClock … // AddToContext creates a derived context that references the specified clock. func AddToContext(ctx context.Context, clock Clock) context.Context { … } // FromContext extracts a clock from the context. If not present, a real clock is returned. func FromContext(ctx context.Context) Clock { … }