Skip to content

Commit

Permalink
Merge pull request #1554 from aboch/lnt
Browse files Browse the repository at this point in the history
Fix new golint reported errors
  • Loading branch information
aboch authored Nov 15, 2016
2 parents 57be722 + 7fd2706 commit be377dc
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:]...)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/dnet/dnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/overlay/ov_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion drivers/overlay/peerdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion drivers/solaris/overlay/ov_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion drivers/solaris/overlay/peerdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions iptables/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit be377dc

Please sign in to comment.