function invocation guards for common call signatures within extension functions.
(i int64, err error)
| 23 | // function invocation guards for common call signatures within extension functions. |
| 24 | |
| 25 | func intOrError(i int64, err error) ref.Val { |
| 26 | if err != nil { |
| 27 | return types.NewErrFromString(err.Error()) |
| 28 | } |
| 29 | return types.Int(i) |
| 30 | } |
| 31 | |
| 32 | func bytesOrError(bytes []byte, err error) ref.Val { |
| 33 | if err != nil { |
no test coverage detected