// RunCurrentContext performs the execution of 'config current-context' sub command
344103
func RunCurrentContext(out io.Writer, options *CurrentContextOptions) error {
	config, err := options.ConfigAccess.GetStartingConfig()
	if err != nil {
		return err
	}

	if config.CurrentContext == "" {
		err = fmt.Errorf("current-context is not set")
		return err
	}

	fmt.Fprintf(out, "%s\n", config.CurrentContext)
	return nil
}
398716
func (s *ClusterInfo) SetCurrentVersion(v string) *ClusterInfo {
	s.CurrentVersion = &v
	return s
}
1263069
func CommandContext(ctx context.Context, prog string, args ...string) *Cmd {
	return &Cmd{
		Cmd: exec.CommandContext(ctx, prog, args...),
		ctx: ctx,
	}
}
293888
func NewContext(mode ...int) *Context {
	context := &Context{
		Iterations:  3,
		Memory:      1 << 12, // 4 MiB
		Parallelism: 1,
		HashLen:     32,
		Mode:        ModeArgon2i,
		Version:     VersionDefault,
	}
	if len(mode) >= 1 {
		context.Mode = mode[0]
	}
	return context
}
1007310
func (stmt *OCI8Stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
	list := make([]namedValue, len(args))
	for i, nv := range args {
		list[i] = toNamedValue(nv)
	}
	return stmt.exec(ctx, list)
}
1234069
func GetCurrentContext() *Window {
	w := C.glfwGetCurrentContext()
	panicError()
	if w == nil {
		return nil
	}
	return windows.get(w)
}
871666
func (cmd *ConfigCommand) Run(_ context.Context) error {
	buf, err := toml.Marshal(*cmd.Config)
	if err != nil {
		return err
	}
	fmt.Fprintln(cmd.Stdout, string(buf))
	return nil
}
1156748
func (call *IssueLinkTokenCall) WithContext(ctx context.Context) *IssueLinkTokenCall {
	call.ctx = ctx
	return call
}
492087
func NewContext() (retVal *Context) {
	var internal C.cudnnHandle_t
	if err := result(C.cudnnCreate(&internal)); err != nil {
		panic(err)
	}
	retVal = &Context{internal}
	return retVal
}
891110
func WithContext(ctx context.Context, fnctx Context) context.Context {
	return context.WithValue(ctx, ctxKey, fnctx)
}
621190
func (p *ChangePoller) Run(c context.Context) {
	if p.Period <= 0 {
		return
	}

	for {
		// If our Context has been canceled, terminate.
		select {
		case <-c.Done():
			log.WithError(c.Err()).Warningf(c, "Terminating poll loop: context has been cancelled.")
			return
		default:
			// Continue
		}

		log.Fields{
			"timeout": p.Period,
		}.Debugf(c, "Entering change check poll loop...")
		if tr := clock.Sleep(c, p.Period); tr.Incomplete() {
			log.WithError(tr.Err).Debugf(c, "Context cancelled, shutting down change poller.")
			return
		}

		log.Infof(c, "Change check timeout triggered, checking configuration...")
		lastHash := p.ContentHash
		switch err := p.Refresh(c); {
		case err != nil:
			log.WithError(err).Errorf(c, "Failed to refresh config.")

		case lastHash != p.ContentHash:
			log.Fields{
				"originalHash": lastHash,
				"newHash":      p.ContentHash,
			}.Warningf(c, "Configuration content hash has changed.")
			if p.OnChange != nil {
				p.OnChange()
			}

		default:
			log.Fields{
				"currentHash": lastHash,
			}.Debugf(c, "Content hash matches.")
		}
	}
}
1142584
func (r *FlatChain) HandleContext(c *Context) {
	r.op(c, r.handleNext)
}
1069828
func WithContext(ctx context.Context) func(*Client) error {
	return func(c *Client) error {
		c.Ctx = ctx
		return nil
	}
}
71158
func SetContext(ctx context.Context, e Entry) context.Context {
	return context.WithValue(ctx, ctxIdent, e)
}
893653
func (s *Layer) Run(phase string, ctx *c.Context) *c.Context {
	if s.parent != nil {
		ctx = s.parent.Run(phase, ctx)
		if phase != "error" && (ctx.Error != nil || ctx.Stopped) {
			return ctx
		}
	}

	s.mtx.Lock()
	s.stack = filter(s.stack)
	s.mtx.Unlock()

	s.mtx.RLock()
	defer s.mtx.RUnlock()
	return trigger(phase, s.stack, ctx)
}
676194
func (r *FastHttpResponse) SetContext(w *fasthttp.RequestCtx) {
	r.Original = w
	r.Writer = w.Response.BodyWriter()
}
758203
func (s *UpdateDataRetentionInput) SetCurrentVersion(v string) *UpdateDataRetentionInput {
	s.CurrentVersion = &v
	return s
}