change everything to use new util/errors

This commit is contained in:
Tim Hockin
2015-01-08 22:10:03 -08:00
parent cd29ba7ebc
commit 4fcd496d59
10 changed files with 31 additions and 133 deletions

View File

@@ -27,6 +27,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/errors"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/iptables"
"github.com/golang/glog"
)
@@ -575,7 +576,7 @@ func (proxier *Proxier) closePortal(service string, info *serviceInfo) error {
} else {
glog.Errorf("Some errors closing iptables portals for service %q", service)
}
return util.SliceToError(el)
return errors.NewAggregate(el)
}
func (proxier *Proxier) closeOnePortal(portalIP net.IP, portalPort int, protocol api.Protocol, proxyIP net.IP, proxyPort int, name string) []error {
@@ -646,7 +647,7 @@ func iptablesFlush(ipt iptables.Interface) error {
if len(el) != 0 {
glog.Errorf("Some errors flushing old iptables portals: %v", el)
}
return util.SliceToError(el)
return errors.NewAggregate(el)
}
// Used below.