Function returns the last function in the chain, if not empty
()
| 327 | |
| 328 | // Function returns the last function in the chain, if not empty |
| 329 | func (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 |
| 340 | func (st ShellState) WithCall(fn *modFunction, argValues map[string]any) ShellState { |
no test coverage detected