MCPcopy
hub / github.com/dagger/dagger / Delete

Method Delete

cmd/dagger/shell_state.go:103–110  ·  view source on GitHub ↗

Delete removes a state instance by key. The state won't be deleted if in use by a variable.

(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

101//
102// The state won't be deleted if in use by a variable.
103func (s *ShellStateStore) Delete(ctx context.Context, key string) {
104 if s.isUsed(ctx, key) {
105 return
106 }
107 s.mu.Lock()
108 delete(s.data, key)
109 s.mu.Unlock()
110}
111
112// Load is like [Get] but returns an error if the key is not found or if
113// the state represents an error.

Callers 8

ExtractMethod · 0.95
WithoutMountMethod · 0.45
WithoutUnixSocketMethod · 0.45
WithoutSecretVariableMethod · 0.45
WithoutAnnotationMethod · 0.45
DeleteLookupMethod · 0.45
withoutUnixSocketMethod · 0.45
SaveMethod · 0.45

Calls 1

isUsedMethod · 0.95

Tested by

no test coverage detected