Use package empty handle for pkg APIs (#117)

- Package methods only need an empty handle.
  Not a regular Handle with a couple of
  sockets creation/delete.

Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
Alessandro Boch
2016-05-09 16:55:00 -07:00
committed by Vish Ishaya
parent e361359783
commit f116a3048a
12 changed files with 67 additions and 383 deletions

View File

@@ -8,12 +8,7 @@ import (
)
func LinkGetProtinfo(link Link) (Protinfo, error) {
h, err := NewHandle()
if err != nil {
return Protinfo{}, err
}
defer h.Delete()
return h.LinkGetProtinfo(link)
return pkgHandle.LinkGetProtinfo(link)
}
func (h *Handle) LinkGetProtinfo(link Link) (Protinfo, error) {