mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix typos and review comments
Signed-off-by: dhilipkumars <dhilip.kumar.s@huawei.com>
This commit is contained in:
parent
81296dda15
commit
9376cd3c63
2 changed files with 12 additions and 14 deletions
|
@ -20,7 +20,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// For Quick Reference IPVS related netlink message is described at the end of this file.
|
// For Quick Reference IPVS related netlink message is described at the end of this file.
|
||||||
|
|
||||||
var (
|
var (
|
||||||
native = nl.NativeEndian()
|
native = nl.NativeEndian()
|
||||||
ipvsFamily int
|
ipvsFamily int
|
||||||
|
@ -74,7 +73,6 @@ func setup() {
|
||||||
|
|
||||||
func fillService(s *Service) nl.NetlinkRequestData {
|
func fillService(s *Service) nl.NetlinkRequestData {
|
||||||
cmdAttr := nl.NewRtAttr(ipvsCmdAttrService, nil)
|
cmdAttr := nl.NewRtAttr(ipvsCmdAttrService, nil)
|
||||||
|
|
||||||
nl.NewRtAttrChild(cmdAttr, ipvsSvcAttrAddressFamily, nl.Uint16Attr(s.AddressFamily))
|
nl.NewRtAttrChild(cmdAttr, ipvsSvcAttrAddressFamily, nl.Uint16Attr(s.AddressFamily))
|
||||||
if s.FWMark != 0 {
|
if s.FWMark != 0 {
|
||||||
nl.NewRtAttrChild(cmdAttr, ipvsSvcAttrFWMark, nl.Uint32Attr(s.FWMark))
|
nl.NewRtAttrChild(cmdAttr, ipvsSvcAttrFWMark, nl.Uint32Attr(s.FWMark))
|
||||||
|
@ -267,7 +265,7 @@ func parseIP(ip []byte, family uint16) (net.IP, error) {
|
||||||
case syscall.AF_INET6:
|
case syscall.AF_INET6:
|
||||||
resIP = (net.IP)(ip[:16])
|
resIP = (net.IP)(ip[:16])
|
||||||
default:
|
default:
|
||||||
return resIP, fmt.Errorf("parseIP Error ip=%v", ip)
|
return nil, fmt.Errorf("parseIP Error ip=%v", ip)
|
||||||
|
|
||||||
}
|
}
|
||||||
return resIP, nil
|
return resIP, nil
|
||||||
|
@ -368,7 +366,7 @@ func (i *Handle) parseService(msg []byte) (*Service, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(NetLinkAttrs) == 0 {
|
if len(NetLinkAttrs) == 0 {
|
||||||
return nil, fmt.Errorf("Error No valid net link message found while Parsing service record")
|
return nil, fmt.Errorf("error no valid netlink message found while parsing service record")
|
||||||
}
|
}
|
||||||
|
|
||||||
//Now Parse and get IPVS related attributes messages packed in this message.
|
//Now Parse and get IPVS related attributes messages packed in this message.
|
||||||
|
@ -449,7 +447,7 @@ func (i *Handle) parseDestination(msg []byte) (*Destination, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(NetLinkAttrs) == 0 {
|
if len(NetLinkAttrs) == 0 {
|
||||||
return nil, fmt.Errorf("Error No valid net link message found while Parsing service record")
|
return nil, fmt.Errorf("error no valid netlink message found while parsing destination record")
|
||||||
}
|
}
|
||||||
|
|
||||||
//Now Parse and get IPVS related attributes messages packed in this message.
|
//Now Parse and get IPVS related attributes messages packed in this message.
|
||||||
|
|
Loading…
Add table
Reference in a new issue