MCPcopy Create free account
hub / github.com/dagger/dagger / spreadDebugArgs

Function spreadDebugArgs

cmd/dagger/shell_state.go:217–244  ·  view source on GitHub ↗
(args ...any)

Source from the content-addressed store, hash-verified

215}
216
217func spreadDebugArgs(args ...any) []any {
218 a := []any{}
219 for _, arg := range args {
220 switch t := arg.(type) {
221 case *ShellState:
222 if t == nil {
223 a = append(a, "state", nil)
224 continue
225 }
226 a = append(a, "key", t.Key)
227 if t.ModDigest != "" {
228 a = append(a, "module", t.ModDigest)
229 }
230 if t.Cmd != "" {
231 a = append(a, "namespace", t.Cmd)
232 }
233 if len(t.Calls) > 0 {
234 a = append(a, "calls", t.Calls)
235 }
236 if t.Error != nil {
237 a = append(a, "error", t.Error)
238 }
239 default:
240 a = append(a, arg)
241 }
242 }
243 return a
244}
245
246// ShellState is an intermediate representation of a query
247//

Callers 2

debugMethod · 0.85
SaveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected