mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix new golint reported errors
Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
d72e368d40
commit
5b4059e087
7 changed files with 8 additions and 8 deletions
|
@ -65,7 +65,7 @@ func (cli *NetworkCli) Cmd(chain string, args ...string) error {
|
|||
if len(args) > 0 {
|
||||
method, exists := cli.getMethod(args[0])
|
||||
if !exists {
|
||||
return fmt.Errorf("%s: '%s' is not a %s command. See '%s --help'.\n", chain, args[0], chain, chain)
|
||||
return fmt.Errorf("%s: '%s' is not a %s command. See '%s --help'", chain, args[0], chain, chain)
|
||||
}
|
||||
return method(chain, args[1:]...)
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ type NetworkOrchestration struct {
|
|||
|
||||
func (d *dnetConnection) dnetDaemon(cfgFile string) error {
|
||||
if err := startTestDriver(); err != nil {
|
||||
return fmt.Errorf("failed to start test driver: %v\n", err)
|
||||
return fmt.Errorf("failed to start test driver: %v", err)
|
||||
}
|
||||
|
||||
cfg, err := d.parseConfig(cfgFile)
|
||||
|
|
|
@ -77,7 +77,7 @@ func (d *driver) CreateEndpoint(nid, eid string, ifInfo driverapi.InterfaceInfo,
|
|||
}
|
||||
|
||||
if s := n.getSubnetforIP(ep.addr); s == nil {
|
||||
return fmt.Errorf("no matching subnet for IP %q in network %q\n", ep.addr, nid)
|
||||
return fmt.Errorf("no matching subnet for IP %q in network %q", ep.addr, nid)
|
||||
}
|
||||
|
||||
if ep.mac == nil {
|
||||
|
|
|
@ -277,7 +277,7 @@ func (d *driver) peerAdd(nid, eid string, peerIP net.IP, peerIPMask net.IPMask,
|
|||
|
||||
s := n.getSubnetforIP(IP)
|
||||
if s == nil {
|
||||
return fmt.Errorf("couldn't find the subnet %q in network %q\n", IP.String(), n.id)
|
||||
return fmt.Errorf("couldn't find the subnet %q in network %q", IP.String(), n.id)
|
||||
}
|
||||
|
||||
if err := n.obtainVxlanID(s); err != nil {
|
||||
|
|
|
@ -76,7 +76,7 @@ func (d *driver) CreateEndpoint(nid, eid string, ifInfo driverapi.InterfaceInfo,
|
|||
}
|
||||
|
||||
if s := n.getSubnetforIP(ep.addr); s == nil {
|
||||
return fmt.Errorf("no matching subnet for IP %q in network %q\n", ep.addr, nid)
|
||||
return fmt.Errorf("no matching subnet for IP %q in network %q", ep.addr, nid)
|
||||
}
|
||||
|
||||
if ep.mac == nil {
|
||||
|
|
|
@ -263,7 +263,7 @@ func (d *driver) peerAdd(nid, eid string, peerIP net.IP, peerIPMask net.IPMask,
|
|||
|
||||
s := n.getSubnetforIP(IP)
|
||||
if s == nil {
|
||||
return fmt.Errorf("couldn't find the subnet %q in network %q\n", IP.String(), n.id)
|
||||
return fmt.Errorf("couldn't find the subnet %q in network %q", IP.String(), n.id)
|
||||
}
|
||||
|
||||
if err := n.obtainVxlanID(s); err != nil {
|
||||
|
|
|
@ -130,7 +130,7 @@ func NewChain(name string, table Table, hairpinMode bool) (*ChainInfo, error) {
|
|||
// ProgramChain is used to add rules to a chain
|
||||
func ProgramChain(c *ChainInfo, bridgeName string, hairpinMode, enable bool) error {
|
||||
if c.Name == "" {
|
||||
return fmt.Errorf("Could not program chain, missing chain name.")
|
||||
return fmt.Errorf("Could not program chain, missing chain name")
|
||||
}
|
||||
|
||||
switch c.Table {
|
||||
|
@ -166,7 +166,7 @@ func ProgramChain(c *ChainInfo, bridgeName string, hairpinMode, enable bool) err
|
|||
}
|
||||
case Filter:
|
||||
if bridgeName == "" {
|
||||
return fmt.Errorf("Could not program chain %s/%s, missing bridge name.",
|
||||
return fmt.Errorf("Could not program chain %s/%s, missing bridge name",
|
||||
c.Table, c.Name)
|
||||
}
|
||||
link := []string{
|
||||
|
|
Loading…
Add table
Reference in a new issue