MCPcopy Index your code
hub / github.com/dagger/dagger / resolveState

Method resolveState

cmd/dagger/shell_state.go:473–486  ·  view source on GitHub ↗

resolveState returns the resolved value of a state instance given its key

(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

471
472// resolveState returns the resolved value of a state instance given its key
473func (h *shellCallHandler) resolveState(ctx context.Context, key string) (string, error) {
474 st, err := h.state.Extract(ctx, key)
475 if err != nil {
476 return "", err
477 }
478 r, err := h.StateResult(ctx, st)
479 if err != nil {
480 return "", err
481 }
482 h.mu.Lock()
483 h.lastResult = r
484 h.mu.Unlock()
485 return r.String()
486}
487
488func (h *shellCallHandler) newModState(dig string) ShellState {
489 return ShellState{

Callers 1

resolveResultMethod · 0.95

Calls 3

StateResultMethod · 0.95
ExtractMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected