Skip to content

Commit

Permalink
Merge pull request #947 from TrekkieCoder/main
Browse files Browse the repository at this point in the history
gh-829 fixed typos and golint warns
  • Loading branch information
TrekkieCoder authored Jan 26, 2025
2 parents 324fa9b + 9e6f602 commit 5cc6c63
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/loxinet/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ type CIStateH struct {
initRules6 bool
}

func (ci *CIStateH) BFDSessionNotify(instance string, remote string, ciState string) {
func (ci *CIStateH) BFDSessionNotify(instance string, _ string, ciState string) {
var sm cmn.HASMod

sm.Instance = instance
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/layer2.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func (l2 *L2H) FdbsTicker() {
}

// PortNotifier - Implementation of PortEventIntf interface
func (l2 *L2H) PortNotifier(name string, osID int, evType PortEvent) {
func (l2 *L2H) PortNotifier(name string, _ int, evType PortEvent) {
if evType&PortEvDown|PortEvDelete|PortEvLowerDown != 0 {
for _, f := range l2.FdbMap {
if f.FdbAttr.Oif == name {
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/layer3.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (l3 *L3H) IfaAdd(Obj string, Cidr string) (int, error) {
ra := RtAttr{0, 0, false, ifObjID, false}
_, err = mh.zr.Rt.RtAdd(*network, RootZone, ra, nil)
if err != nil {
tk.LogIt(tk.LogDebug, "ifa add - %s:%s subnet-rt error\n", addr.String(), Obj)
tk.LogIt(tk.LogTrace, "ifa add - %s:%s subnet-rt error\n", addr.String(), Obj)
return L3AddrErr, errors.New("subnet-route add error")
} else if sz, _ := net.IPMask(network.Mask).Size(); sz != 32 && sz != 128 {
myAddr, myNet, err := net.ParseCIDR(addr.String() + "/32")
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (M *MirrH) MirrDelete(name string) (int, error) {
}

for idx, mObj := range m.MObjs {
var pM *MirrObjInfo = &m.MObjs[idx]
pM := &m.MObjs[idx]
mObj.MirrObj2DP(DpRemove)
pM.Parent = nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/neighbor.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (n *NeighH) Activate(ne *Neigh) {
name := ne.OifPort.Name
addr := ne.Addr
var Sip net.IP
ret := -1
var ret int
if ne.OifPort.IsIPinIPTunPort() {
addr = ne.OifPort.HInfo.TunDst
ret, Sip, name = n.Zone.L3.IfaSelectAny(addr, false)
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/qospol.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (P *PolH) PolDelete(pName string) (int, error) {
}

for idx, pObj := range p.PObjs {
var pP *PolObjInfo = &p.PObjs[idx]
pP := &p.PObjs[idx]
pObj.PolObj2DP(DpRemove)
pP.Parent = nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/utils_cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type CloudHookInterface interface {
CloudUpdatePrivateIP(vIP net.IP, eIP net.IP, add bool) error
}

func CloudHookNew(cloudLabel string) CloudHookInterface {
func CloudHookNew(_ string) CloudHookInterface {
if mh.cloudLabel == "aws" {
return AWSCloudHookNew()
}
Expand Down

0 comments on commit 5cc6c63

Please sign in to comment.