Documentation ¶
Overview ¶
Package testerror contains List type that implements error interface. It can store more than one *rpb.TestError and has some convenience functions to add errors into the List.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
List can be used if more than one *rpb.TestError needs to be returned. It implements the error interface, so it can be returned when an error is needed. Note that the gnmitest framework treats a List with an empty errors slice as a as nil error.
func (*List) AddErr ¶
AddErr adds a non-nil error into the list of errors. If the provided error is an instance of the List struct, its contents (returned by the Errors function) are appended to the receiver's errors slice.
func (*List) AddTestErr ¶
AddTestErr appends the provided list of *rpb.TestError into the errors in List struct.