mirror of
https://github.com/vishvananda/netlink.git
synced 2025-09-26 20:01:13 +08:00
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:

committed by
Vish Ishaya

parent
e361359783
commit
f116a3048a
@@ -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) {
|
||||
|
Reference in New Issue
Block a user