func (c *Client) FromContext(ctx scope.Context) bool { var k clientKey src, ok := ctx.Get(k).(*Client) if !ok || src == nil { return false } *c = *src return true }
func GetLogger(ctx scope.Context) *logrus.Logger { return ctx.Get(loggerKey).(*logrus.Logger) }
func Logger(ctx scope.Context) *log.Logger { if logger, ok := ctx.Get(logCtx).(*log.Logger); ok { return logger } return log.New(os.Stdout, "[???] ", logFlags) }