From 0996ddb604d0fcd39da7a77db18787eb88659091 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Fri, 14 Aug 2015 12:29:53 +0800 Subject: [PATCH] Rename Errors to GetErrors --- errors.go | 2 +- main.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/errors.go b/errors.go index 5cf29c61..f4743b0a 100644 --- a/errors.go +++ b/errors.go @@ -17,7 +17,7 @@ type Errors struct { errors []error } -func (errs Errors) Errors() []error { +func (errs Errors) GetErrors() []error { return errs.errors } diff --git a/main.go b/main.go index 376156a8..8457dc96 100644 --- a/main.go +++ b/main.go @@ -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 {