Skip to content

Commit

Permalink
cmd: modify the err judgment
Browse files Browse the repository at this point in the history
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
  • Loading branch information
zhouhao committed Sep 7, 2017
1 parent 06bd267 commit 0ad3376
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ func NewValidatorFromPath(bundlePath string, hostSpecific bool, platform string)
}

// CheckAll checks all parts of runtime bundle
func (v *Validator) CheckAll() (errs error) {
func (v *Validator) CheckAll() error {
var errs *multierror.Error
errs = multierror.Append(errs, v.CheckPlatform())
errs = multierror.Append(errs, v.CheckRoot())
errs = multierror.Append(errs, v.CheckMandatoryFields())
Expand All @@ -110,7 +111,7 @@ func (v *Validator) CheckAll() (errs error) {
errs = multierror.Append(errs, v.CheckHooks())
errs = multierror.Append(errs, v.CheckLinux())

return
return errs.ErrorOrNil()
}

// CheckRoot checks status of v.spec.Root
Expand Down

0 comments on commit 0ad3376

Please sign in to comment.