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

Method Function

cmd/dagger/shell_state.go:329–337  ·  view source on GitHub ↗

Function returns the last function in the chain, if not empty

()

Source from the content-addressed store, hash-verified

327
328// Function returns the last function in the chain, if not empty
329func (st ShellState) Function() FunctionCall {
330 if st.IsEmpty() {
331 // The first call is a field under Query.
332 return FunctionCall{
333 ReturnObject: "Query",
334 }
335 }
336 return st.Calls[len(st.Calls)-1]
337}
338
339// WithCall returns a new state with the given function call added to the chain
340func (st ShellState) WithCall(fn *modFunction, argValues map[string]any) ShellState {

Callers 6

WithCallMethod · 0.95
GetDefMethod · 0.95
TypeDefFuncMethod · 0.45
functionCallMethod · 0.45
StateResultMethod · 0.45

Calls 1

IsEmptyMethod · 0.95

Tested by

no test coverage detected