// Pop removes an error from the top of the stack and returns it
Pop removes an error from the top of the stack and returns it
// Pop removes an error from the top of the stack and returns it
func (stack *ErrorStack) Pop() error {
	if len(stack.errors) == 0 {
		return nil
	}
	err := stack.errors[len(stack.errors)-1]
	stack.errors = stack.errors[:len(stack.errors)-1]
	return err
}
func ( stack * ErrorStack ) Pop ( ) error { if len ( stack . errors ) == 0 { return nil } err := stack . errors [ len ( stack . errors ) - 1 ] stack . errors = stack . errors [ : len ( stack . errors ) - 1 ] return err }
Pop removes an error from the top of the stack and returns it
Pop removes an error from the top of the stack and returns it