Don't expose deserializeRoute

This commit is contained in:
Bryan Boreham 2015-08-19 15:41:41 +01:00
parent 80dddfa1b9
commit dfc070d6fa
1 changed files with 4 additions and 4 deletions

View File

@ -131,7 +131,7 @@ func RouteList(link Link, family int) ([]Route, error) {
continue continue
} }
route, err := DeserializeRoute(m) route, err := deserializeRoute(m)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -146,8 +146,8 @@ func RouteList(link Link, family int) ([]Route, error) {
return res, nil return res, nil
} }
// DeserializeRoute decodes a binary netlink message into a Route struct // deserializeRoute decodes a binary netlink message into a Route struct
func DeserializeRoute(m []byte) (Route, error) { func deserializeRoute(m []byte) (Route, error) {
route := Route{} route := Route{}
msg := nl.DeserializeRtMsg(m) msg := nl.DeserializeRtMsg(m)
attrs, err := nl.ParseRouteAttr(m[msg.Len():]) attrs, err := nl.ParseRouteAttr(m[msg.Len():])
@ -205,7 +205,7 @@ func RouteGet(destination net.IP) ([]Route, error) {
var res []Route var res []Route
for _, m := range msgs { for _, m := range msgs {
route, err := DeserializeRoute(m) route, err := deserializeRoute(m)
if err != nil { if err != nil {
return nil, err return nil, err
} }