1
0
Fork 0
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:
dhilipkumars 2017-05-24 00:45:06 +05:30
parent 81296dda15
commit 9376cd3c63
2 changed files with 12 additions and 14 deletions

View file

@ -20,7 +20,6 @@ import (
)
// For Quick Reference IPVS related netlink message is described at the end of this file.
var (
native = nl.NativeEndian()
ipvsFamily int
@ -74,7 +73,6 @@ func setup() {
func fillService(s *Service) nl.NetlinkRequestData {
cmdAttr := nl.NewRtAttr(ipvsCmdAttrService, nil)
nl.NewRtAttrChild(cmdAttr, ipvsSvcAttrAddressFamily, nl.Uint16Attr(s.AddressFamily))
if s.FWMark != 0 {
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:
resIP = (net.IP)(ip[:16])
default:
return resIP, fmt.Errorf("parseIP Error ip=%v", ip)
return nil, fmt.Errorf("parseIP Error ip=%v", ip)
}
return resIP, nil
@ -368,7 +366,7 @@ func (i *Handle) parseService(msg []byte) (*Service, error) {
return nil, err
}
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.
@ -449,7 +447,7 @@ func (i *Handle) parseDestination(msg []byte) (*Destination, error) {
return nil, err
}
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.