Rename Errors to GetErrors

This commit is contained in:
Jinzhu 2015-08-14 12:29:53 +08:00
parent 309740983e
commit 0996ddb604
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ type Errors struct {
errors []error
}
func (errs Errors) Errors() []error {
func (errs Errors) GetErrors() []error {
return errs.errors
}

View File

@ -518,7 +518,7 @@ func (s *DB) AddError(err error) error {
s.log(err)
}
err = Errors{errors: append(s.Errors(), err)}
err = Errors{errors: append(s.GetErrors(), err)}
}
s.Error = err
@ -526,7 +526,7 @@ func (s *DB) AddError(err error) error {
return err
}
func (s *DB) Errors() []error {
func (s *DB) GetErrors() []error {
if errs, ok := s.Error.(Errors); ok {
return errs.errors
} else {