Last returns the last error in the slice. It returns nil if the array is empty. Shortcut for errors[len(errors)-1].
()
| 114 | // Last returns the last error in the slice. It returns nil if the array is empty. |
| 115 | // Shortcut for errors[len(errors)-1]. |
| 116 | func (a errorMsgs) Last() *Error { |
| 117 | if length := len(a); length > 0 { |
| 118 | return a[length-1] |
| 119 | } |
| 120 | return nil |
| 121 | } |
| 122 | |
| 123 | // Errors returns an array with all the error messages. |
| 124 | // Example: |
no outgoing calls